Here is my htaccess code. It works with Apache but with Litespeed doesnt works fine. I want to all html and php files to index.php but in Litespeed,
/example *works, there is no file which named example*
/folder/example.php *works, there are folder and example.php*
/folder/index.php *works, there are folder and index.php*
/folder/ *doesn't works, there is folder and there is index.php in this folder but its not redirect to main index*
so /folder/index.php works, /folder/ doesnt works. but they are same things. htaccess dont understand folder is a php file in Litespeed.
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([A-Za-z0-9-\s]+)/?$ index.php?url=$1 [NC,L,QSA]
RewriteRule ^(.*?\.(?:html?|php))$ index.php?url=$1 [QSA,L,NC]
How about remove
RewriteCond %{REQUEST_FILENAME} !-d
it prevents /folder/ from being rewritten by the first rewrite rule.