htaccess rewrite issue

Jinesh

Well-Known Member
#1
Hi,

I recently moved an OpenCart from Apache server to LiteSpeed.

Some rewrite rules are not working anymore:
https://speedtest.vet/ https://vidmate.bid/
RewriteRule ^([^?]*)$ index.php?_route_=$1 [QSA]
RewriteRule ^([^?]*)/promo index.php?_route_=$1&filter=promo [QSA]

I also need to work query like "category/product" on first rule.

Thank you.
 
Last edited:

Unique_Eric

Administrator
Staff member
#2
Hi,
It seems not default OpenCart rule, may I know if the default one works?
You might want to turn on the rewrite log to check if the request goes through the rule.
 

AndreyPopov

Well-Known Member
#4
Some rewrite rules are not working anymore:

RewriteRule ^([^?]*)$ index.php?_route_=$1 [QSA]
default Opencart rules are:
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|webp|svg|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
L - flag present!!!!!
it's mean Last rule



RewriteRule ^([^?]*)/promo index.php?_route_=$1&filter=promo [QSA]
must be before?????????
 
Top