Forum Moderators: phranque
Is it possible for an expert here to check the following:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
#
#####################################################
# FORUM
RewriteRule ^forum/forum([0-9]+)\.html$ /forum/viewforum.php?f=$1 [QSA,L]
# TOPIC
RewriteRule ^forum/topic([0-9]+)\.html$ /forum/viewtopic.php?t=$1 [QSA,L]
#####################################################
#
Redirect 301 /Contact_Us.htm http://www.example.com/Contact_Us.php
Redirect 301 /Links2.htm http://www.example.com/Links.htm
Redirect 301 /Links3.htm http://www.example.com/Links.htm
Redirect 301 /worldwide_resources.htm http://www.example.com/Links.htm
Redirect 301 /Linktous.htm http://www.example.com/Links.htm
Redirect 301 /Why_choose_us.htm http://www.example.com/about.htm
[edited by: jdMorgan at 2:15 pm (utc) on June 12, 2008]
[edit reason] example.com [/edit]
I would not mix directives from different modules. To do so means you cannot guarantee which order the rules will be processed.
I would avoid mixed case URLs and I never use an underscore in a URL.
Your existing code may lead to a redirection chain for some of the URLs you list.
Trace what happens when you request example.com/Contact_Us.htm for example.
Finally, you don't need to change some URLs from .htm to .php. You can either use a rewrite (not a redirect) to connect the .htm URL to the equivalent .php file on the server, or you can force .htm files to be parsed for PHP scripting.