sploit Posted December 7, 2005 Share Posted December 7, 2005 hi, i have a url like: mysite.com/show.php?catid=1&catname=clothing can i rewrite it as mysite.com/clothing/ ? Quote Link to comment https://forums.phpfreaks.com/topic/2996-mod-rewrite/ Share on other sites More sharing options...
tiki Posted December 8, 2005 Share Posted December 8, 2005 RewriteEngine On RewriteRule ^([a-z]+)/$ show.php?catid=1&catname=$1 Should do it, but it might not work do to you having cat with 2 variables, better to put id/name in an array as '1 => Clothing' Quote Link to comment https://forums.phpfreaks.com/topic/2996-mod-rewrite/#findComment-10082 Share on other sites More sharing options...
bon Posted January 21, 2006 Share Posted January 21, 2006 Sploit, tiki forgot to mention you have to put that code into your .htaccess file. If you don't know how to do that, check out [a href=\"http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html\" target=\"_blank\"]http://www.yourhtmlsource.com/sitemanageme...lrewriting.html[/a] Quote Link to comment https://forums.phpfreaks.com/topic/2996-mod-rewrite/#findComment-11038 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.