Redirecting using Apache and .htaccess
Hello:
I am trying to redirect from the page: thesolarforum.com/forum to the new forum at thesolarforum.com/mm-forum But, I can't seem to figure out what's wrong with my code in the .htaccess file RewriteCond %{HTTP_HOST} ^thesolarforum.com\forum$ [OR] RewriteCond %{HTTP_HOST} ^www.thesolarforum.com\forum$ RewriteRule ^$ "http\:\/\/www\.thesolarforum\.com\/mm-forum/listcat\/" [R=301,L] Oh, I'm a novice so please consider that with suggestions. ;) |
First you need a
Code:
RewriteEngine on Then in the RewriteCond you should use REQUEST_URI instead of HTTP_HOST, and also the backslashes are wrong: Then you need a "^(.*)" (means everything) in the RewriteRule. Also there is no need to escape every special character. So try the following and see if it works: Code:
RewriteEngine on |
Thank you - that worked like a charm!!!
|
All times are GMT -5. The time now is 02:30 AM. |