htaccess help

Discussion in 'Apache' started by falarious, Jan 6, 2013.

  1. #1
    I have over 2000+ posts with the following URL structure

    site.com/ID/POST-TITLE

    I need to redirect each post to

    site.com/post.php?id=ID

    If someone could shed some light on this I will greatly appreciate it.
     
    falarious, Jan 6, 2013 IP
  2. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #2
    Something like this might work:

    RewriteRule /([\d]+)/([\w\d_\-]+)/?$ /post.php?id=$1
     
    zacharooni, Jan 6, 2013 IP