Hi, Wondering if anyone can look over my file and tell me if it's doing what it is suppose to. It's for my forum also in http://example.com/forum what is also happening is I get a 301 redirect from running header server test for /forum. So I am not confident it's right and thought I better get help as in the Google Webmaster tools it's throwing lots of errors. I will give a few examples of urls and what I need them to do then the htaccess file. The numbers are just examples I need anything that comes in from any number (ex. FORUM_ID=2 or FORUM_ID=15) same goes with TOPIC_ID and so on. <snip>. Thanks!
--------------------------------
http://www.example.com/forum/forum.asp?FORUM_ID=2&whichpage=10
to
http://www.example.com/forum/
--------------------------------
http://www.example.com/forum/forum.asp?FORUM_ID=2
to
http://www.example.com/forum/index.php?showforum=2
--------------------------------
http://www.example.com/forum/forum.asp?whichpage=10
to
http://www.example.com/forum/
--------------------------------
http://www.example.com/forum/index.php?showtopic=100051&TOPIC_ID=100051
to
http://www.example.com/forum/index.php?showtopic=100051
--------------------------------
http://www.example.com/forum/index.php?showtopic=100594&TOPIC_ID=100594&whichpage=2
to
http://www.example.com/forum/index.php?showtopic=100594
-------------------
-------------------
<IfModule mod_rewrite.c>
Options +FollowSymLinks +Indexes
RewriteEngine on
#
RewriteCond %{QUERY_STRING} ^showtopic\=([0-9]+)\&TOPIC_ID\=([^&]+)$
RewriteRule ^$ /forum/index.php? [R=301,L]
#
RewriteCond %{QUERY_STRING} TOPIC_ID=([0-9]+)
RewriteRule ^topic.asp$ /forum/index.php?showtopic=%1 [R=301,L]
#
RewriteCond %{QUERY_STRING} ^TOPIC_ID=([0-9]+)&whichpage=([0-9]+)
RewriteRule ^forum.asp$ /forum/index.php? [R=301,L]
#
RewriteCond %{QUERY_STRING} ^FORUM_ID=([0-9]+)&whichpage=([0-9]+)
RewriteRule ^index.php$ /forum/index.php? [R=301,L]
#
RewriteCond %{QUERY_STRING} FORUM_ID=([0-9]+)
RewriteRule ^forum.asp$ /forum/index.php? [R=301,L]
#
RewriteCond %{QUERY_STRING} whichpage=([0-9]+)
RewriteRule ^forum.asp$ /forum/index.php? [R=301,L]
#
RewriteRule ^forum.asp$ /forum/index.php [R=301,L,QSA]
</IfModule>
This is a good start then I can come back and repost others as I see google throwing them back. Thanks head of time to whoever helps me out here, it's more appreciate it then you could imagine.
[edited by: jdMorgan at 12:25 am (utc) on Jan. 8, 2008]
[edit reason] TOS #20 [/edit]