Simple mod_rewrite for dynamic urls

Discussion in 'Apache' started by jnelson563, Oct 19, 2009.

  1. #1
    I'm terrible at mod_rewrite. And sorry for cluttering the forum with another topic, but I can't seem to get help anywhere that works.

    I have a website. The structure is domain.com/blog/view.php?id=2

    How can I get it to show domain.com/blog/view/2 ?

    It seems really easy and probably is, but I can't get it to work!
     
    jnelson563, Oct 19, 2009 IP
  2. chadsmith

    chadsmith Peon

    Messages:
    82
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteRule ^blog/view/([0-9]+)$ /blog/view.php?id=$1 [L]
    Code (markup):
     
    chadsmith, Oct 21, 2009 IP