SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: URL Rewriting

  1. #1
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    URL Rewriting

    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

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    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 Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out the SitePoint article mod_rewrite: A Beginner's Guide to URL Rewriting aswell.

  4. #4
    SitePoint Evangelist Will Kelly's Avatar
    Join Date
    May 2005
    Location
    London
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •