.htaccess syntax help needed

Discussion in 'Site & Server Administration' started by pachow, Mar 22, 2008.

  1. #1
    hello!

    i'm desperately in need of an htaccess expression if there are any experts out there reading.

    i need to redirect /archive/o_t__t_4267__topicname.html

    to /archive.php/?topicid=4267

    the only things that will change in the above example URL will be the number and the topicname. "ot_t__" at the start will always be there.

    thanks so much in advance to anyone who can have a crack at this... :D

    cheers

    pachow.
     
    pachow, Mar 22, 2008 IP
  2. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This really belongs in the Apache section but you'll still get an answer from me.
    RewriteRule ^/archive/o_t__t_([0-9]+)__.*.html$ /archive.php/?topicid=$1 [NC,L]
    Code (markup):
    or, if it's going in a .htaccess file:
    RewriteRule ^archive/o_t__t_([0-9]+)__.*.html$ archive.php/?topicid=$1 [NC,L]
    Code (markup):
     
    Ladadadada, Mar 23, 2008 IP
  3. pachow

    pachow Guest

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    wow. thank you!

    *goes off to try it*
     
    pachow, Mar 23, 2008 IP