I'm trying to configure my root htaccess file to:
1.) Redirect my domain.com to domain.com/forums/index.php
2.) Force the use of www.
Any help is much appreciated.
This is a discussion on htaccess within the General Discussion forums, part of the vBulletin SEO Discussion category; I'm trying to configure my root htaccess file to: 1.) Redirect my domain.com to domain.com/forums/index.php 2.) Force the use of ...
I'm trying to configure my root htaccess file to:
1.) Redirect my domain.com to domain.com/forums/index.php
2.) Force the use of www.
Any help is much appreciated.
Hello,
you can try this:
Code:RewriteEngine on RewriteRule ^$ http://www.domain.com/forums/index.php [L,R=301] RewriteCond %{HTTP_HOST} !^www\.domain\.com RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
Last edited by Oleg Ignatiuk; 02-13-2009 at 11:47 AM. Reason: added [L,R=301]
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
I get a Bad Request error.
I notice the url becomes http://www.domain.com//forums/index.php
Try to replace the second line with:
Can you post your domain name?Code:RewriteRule ^$ http://www.domain.com/forums/index.php [L,R=301]
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
I'm currently using this:
and that redirects to the forum index.php, but I can't see how it is forcing www.Code:I'm currentRewriteEngine on RewriteCond %{HTTP_HOST} ^.*$ RewriteRule ^/?$ "http\:\/\/www\.domain\.com\/forums\/index\.php" [R=301,L]
I made your change and it seems to be working now.![]()
One last question,
Would it be better to redirect to http://www.domain.com/forums
OR
http://www.domain.com/forums/index.php![]()
IMO, www.domain.com/forums/ would be the best option.
Yes, agree.
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!