How to rewrite the URL for my search page in opencart that is like
http://IP/opencart/index.php?route=product/search&filter_name=24
But I need to display it like
http://localhost/opencart/product/search/42
orelse in any formate that is an userfreindly.I have tried like
RewriteEngine On
RewriteBase /opencart
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteBase /opencart
RewriteRule ^search$ index.php?route=product/search [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/search$
RewriteRule ^([^?]*) index.php?route=$1 [L,QSA]
How about this:
Please note that the slash in the route parameter complicates things.