help with simple rewrite

Discussion in 'Apache' started by dethfire, Apr 23, 2015.

  1. #1
    I'm trying to get https://www.example.com/topic.asp?ARCHIVE=&TOPIC_ID=5747

    to

    https://www.example.com/showthread.php?t=5747

    Here is my attempt, but it doesn't redirect

    RewriteCond %{REQUEST_URI} ^/topic.asp$
    RewriteCond %{QUERY_STRING} ^TOPIC_ID=([0-9]+)$
    RewriteRule ^(.*)$ https://www.example.com/showthread.php?t=%1 [R=301,L]
     
    dethfire, Apr 23, 2015 IP