Htaccess for openlitespeed

#1
Hi,
Help me with .htaccess for openlitespeed.
My attempts are unsuccessful.

code orginal apache :

Apache config:
# Prevent directory listings

Options -Indexes



# Prevent visitors from viewing files directly

<Files "\.(sdb|md|html|txt)$">   

<IfModule !mod_authz_core.c>       

Order allow,deny       

Deny from all       

Satisfy All   

</IfModule>   

<IfModule mod_authz_core.c>       

Require all denied   

</IfModule>

</Files>



# URL rewrites

<IfModule mod_rewrite.c>   

RewriteEngine On   

RewriteRule ^(inc/|themes/|tmp/).*\.(php|html)$ - [F,L]   

RewriteCond %{REQUEST_FILENAME} !-f   

RewriteCond %{REQUEST_FILENAME} !-d   

RewriteRule ^ index.php [L]

</IfModule>

Thank you very much :) .
 
Last edited:

Cold-Egg

Administrator
#4
I just created one and it loads fine on my test server

dashboard.png

By the way, some folders may need 777 permission (from batflat official doc, https://batflat.org/docs)

You might also want to change .htaccess content to the following
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(inc/|themes/|tmp/).*\.(php|html)$ - [F]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ index.php [L]
</IfModule>
Hope above information helps.
 
#5
Thank you
Found the setting: Rewrite
Enable Rewrite: YES
Auto Load from .htaccess: Yes
But I am having a problem with file permissions.
1 step forward 2 back ....
 
#6
Welcome,
I test all the time and the biggest problem with permissions although I gave 775 directories and 664 files globally.
The settings are saved only after a full reset.
Is it fully functional for you?
If so, give what chmod you gave.
If you can, send me vhconf.conf.
Of course, if it works 100% for you.
Best regards,
 
#7
I don't know where I'm making a mistake anymore.
Pages on wordpress work ok! pages on cms sqlite have a problem.
Now I'm testing https://www.bludit.com/
It works badly on my server.
Hosting with litespeed + cpanel works nice.
I don't know what could be wrong.
 

Cold-Egg

Administrator
#8
Hi,
I only click those buttons and all load fine. I can not share the config since I have already destroyed the server.
If you can load WordPress fine, then there's no issue with PHP and virtual host.
To identify if this is a permission issue, could you change all dir and files to 777 permission temporarily?
 
#9
Hi,
I checked various configurations and I don't want to work properly.
I can give access to my server, to check the configuration, please enter a priv e-mail - ok ?
 
Top