oshopindia Posted August 6, 2013 Share Posted August 6, 2013 i want to chage my website url http://www.oshopindia.com/productdetail.php?prodid=3649 to http://www.oshopindia.com/productdetail/3649 through mod_rewrite i hosted my website in subdirectory Quote Link to comment https://forums.phpfreaks.com/topic/280891-mod_rewrite/ Share on other sites More sharing options...
jazzman1 Posted August 6, 2013 Share Posted August 6, 2013 (edited) Your post is not for here, there is an apache section in the forum. So, don't provide to users URL's like - hostName/productdetail.php?prodid=23423. The URL should be as expected - hostName/productdetail/3649 Then go to web root and create the apache rewriting rule. RewriteEngine On RewriteBase / # web root RewriteRule ^/?([0-9]+)$ productdetail.php?prodid=$1 [L] Edited August 6, 2013 by jazzman1 Quote Link to comment https://forums.phpfreaks.com/topic/280891-mod_rewrite/#findComment-1443709 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.