Help rewrite .htaccess under Openlitespeed

Amney

New Member
#1
Have a good time!

I have this .htaccess with this kind of content:

Code:
DirectoryIndex index.php index.html

ErrorDocument 404 /404.html
ErrorDocument 403 /403.html

<Files .*>
    <IfModule !mod_access_compat.c>
        Require all denied
    </IfModule>
    <IfModule mod_access_compat.c>
        Order deny,allow
        Deny from all
    </IfModule>
</Files>

<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
#RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
#RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

RewriteRule ^(?:cache|log)\b.* - [R=403,L]

RewriteCond %{REQUEST_FILENAME} \.php$
RewriteRule !index\.php.* - [R=403,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^assets/css/cache$ assets/css/index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^assets/js/cache$ assets/js/index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^assets/js/cm$ assets/js/codemirror/index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule .* index.php/$0 [L]
RewriteRule .* index.php [PT,QSA,L]
</IfModule>

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>

<IfModule mod_headers.c>
Header always append X-Frame-Options SAMEORIGIN
</IfModule>
I also have a website that runs under CyberPanel + Openlitespeed.
but unfortunately, this site doesn't want rewrite.


Could you help me, make it so OLS understands?
 

lsqtwrk

Administrator
#8
yes, but besides that error message , do you have any more specific issue ?

if it uses apache way to detect mod_rewrite, it will always show failed despite the OLS actually supports URL rewrite
 

lsqtwrk

Administrator
#10
well , frankly I don't know , try to read its code but PHP is not exactly my skill

please try contact the CMS author and kindly ask for how it detects "clean URL" is supported or not
 
#11
well , frankly I don't know , try to read its code but PHP is not exactly my skill

please try contact the CMS author and kindly ask for how it detects "clean URL" is supported or not
Thanks, I'll try to find out.
The thing is that the author of the project disappeared, it is very difficult to contact him.
 
Top