mod_rewrite, need regex help

Discussion in 'Apache' started by brianmuse, Apr 16, 2009.

  1. #1
    Let me preface by saying that I am completely new to regular expressions and mod_rewrite.

    I've been looking around for a while and I haven't found anything posted that could help me specifically. Heres what I'd like:

    URL typed into browser:
    www.website.com/user/brian/?extra=1

    Rewritten URI
    www.website.com/users.php?user=brian&extra=1

    Basically looking to have the initial URL be static, but with the possibility of a dynamic variable appended to the end.

    I know the basics of mod_rewrite from tutorials I've found online, but can't seem to figure out this specific problem.

    Thanks,
    Brian
     
    brianmuse, Apr 16, 2009 IP
  2. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    why do you need to make it complicated by wanting "www.website.com/user/brian/?extra=1" instead of just "www.website.com/user/brian/1" ??
     
    szalinski, May 26, 2009 IP