Rewrite rules - how to make it work?

stmx

New Member
#1
Hello,

I used Apache before with this .htaccess in VHost Root dir:

Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?!$1!&%{QUERY_STRING} [L]
For example, if server can't find some file it's rewrite to index.php to download and save it.
For some reason LiteSpeed always show 404 error and do not rewrite request to index.php
 

Cold-Egg

Administrator
#4
Hi,

Could you try a simple one first, e.g.
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ https://example.com/ [L]
and make sure it's works.
Or turn on the rewrite log and make sure the request goes through the rewrite.
 
Top