I m developing a website in PHP which has categories and subcategories
http://localhost/business/categorylisting.php?catid=22
i want to modify it as
http://localhost/business/category/22/categoryname.html
thanx in advance
| SitePoint Sponsor |
I m developing a website in PHP which has categories and subcategories
http://localhost/business/categorylisting.php?catid=22
i want to modify it as
http://localhost/business/category/22/categoryname.html
thanx in advance


Hi, a quick search of the forum for mod_rewrite should give you the answers. Also have a look in the Apache section of the forums.
I suppose it depends on your server setup as well.
Spike
Mike Swiffin - Community Team Leader
Only a woman can read between the lines of a one word answer.....
I started out with nothing... and still got most of it left!





Check out the SitePoint article mod_rewrite: A Beginner's Guide to URL Rewriting aswell.![]()



And the cheatsheet at ilovejackdaniels.com is very useful too!
oh btw you can only translate what was in the original url, so there's no way of getting the category name unless you have that in the query string too.
Bookmarks