php - Rewrite condition is not working -


how rewrite url search page in opencart like

http://ip/opencart/index.php?route=product/search&filter_name=24 

but need display like

http://localhost/opencart/product/search/42 

orelse in formate 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 this:

rewritebase / rewriterule ^opencart/([^/]*)/([^/]*)/([^/]*)$ /opencart/index.php?route=$1/$2&filter_name=$3 [l] 

please note slash in route parameter complicates things.


Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -