.htaccess URL Rewrite

Discussion in 'Programming' started by cane, Jan 23, 2010.

  1. #1
    I'm trying to rewrite a url with two different numbers in it,

    Let's say I have "page.php?id=5" well I have no problem getting like "page/5" by using

    RewriteRule page/(.*) page.php?id=$1 [NC]
    Code (markup):
    But how is it working out to make something like "page.php?id=5&page=2" become "page/5/page2" for example?

    I've been reading many tutorial but I cant find the right way to make it work.

    Now second thing, if I have a search page on my website, and it uses "search.php?text=Search Query", how can I change it to "search/Search Query"?

    It would be much appreciated if you could link me to a tutorial or give me an example!

    Thanks to anyone.
     
    cane, Jan 23, 2010 IP
  2. NeoCambell

    NeoCambell Peon

    Messages:
    456
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    NeoCambell, Jan 23, 2010 IP
  3. cane

    cane Active Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #3
    Alright Ill check that out, thanks.
     
    cane, Jan 23, 2010 IP