JamesWP
01-21-2007, 07:11 PM
I recently converted my forum software, resulting in everything having a different URL than it used to. To keep the search engines happy, I am trying to use a .htaccess redirect to point old URLs to the correct threads in the new format.
Example:
Old URL:
http://mywebsite.com/forums/index.php?showtopic=12345
New URL:
http://mywebsite.com/forums/index.php/topic,12345.0.html
As you can see, the formatting is quite different.
In my .htaccess file, I have entered the following:
RedirectMatch /forums/index\.php?showtopic=[0-9]$ http://mywebsite.com/forums/index.php/topic,$1.0.html
However, it has no effect whatsoever. Obviously I've taken the wrong approach, so can anyone show me where I've gone wrong? Please bear in mind that I'm a complete .htaccess beginner.
Many thanks in advance!
Example:
Old URL:
http://mywebsite.com/forums/index.php?showtopic=12345
New URL:
http://mywebsite.com/forums/index.php/topic,12345.0.html
As you can see, the formatting is quite different.
In my .htaccess file, I have entered the following:
RedirectMatch /forums/index\.php?showtopic=[0-9]$ http://mywebsite.com/forums/index.php/topic,$1.0.html
However, it has no effect whatsoever. Obviously I've taken the wrong approach, so can anyone show me where I've gone wrong? Please bear in mind that I'm a complete .htaccess beginner.
Many thanks in advance!