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


i want manage url of website

right showing me www.computermall.co.in/product_details.php?prdid=34

but want www.computermall.co.in/product_details/34

how can it?

i have tried this

options +followsymlinks -multiviews rewriteengine on rewritebase /computermall  # uri-path directly the_request variable rewritecond %{the_request} ^(get|head)\s/(.*)\.php [nc] # strip extension , redirect permanently rewriterule  .*   /%2   [r=301,l,nc]  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} !\.php  [nc] # map internally original resource rewriterule ^(.*)$ $1.php [l,qsa]  

try this:

rewriteengine on rewriterule ^product_details/prdid/([^/]*)$ /product_details?prdid=$1 [l] 

edit: removed leading slash


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -