Htaccess for openlitespeed

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 mod_authz_core.c>       

Require all denied   



# 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]


Thank you very much :) .
Last edited:


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


By the way, some folders may need 777 permission (from batflat official doc,

You might also want to change .htaccess content to the following
<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]
Hope above information helps.
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 ....
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,
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
It works badly on my server.
Hosting with litespeed + cpanel works nice.
I don't know what could be wrong.


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?
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 ?