The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hello
I want to redirect all the non-www forum url's including the main page, to www. Is there a mod/hack to do this for me ? I tried a few commands in .htaccess, the main page would be redirected but the rest the pages would give an error page. Any advice/help is appreciated. Thank You. |
|
#2
|
||||
|
||||
|
I use In .htaccess
Code:
RewriteCond %{HTTP_HOST} !^www.mysitez.com$ [NC]
RewriteRule ^(.*)$ http://www.mysitez.com$1 [R=301,L]
|
|
#3
|
|||
|
|||
|
Thanks but its not working for me.
Only the main page works and the non-www pages would give an error, instead of redirecting to www. |
|
#4
|
||||
|
||||
|
Try this, my version is rather more complicated because it's done for multiple domains but I think this is how it started out.
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain.com/$ [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [R=301]
|
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
||||
|
||||
|
Wikipedia says this: http://en.wikipedia.org/wiki/No-www#Apache_example
|
|
#7
|
||||
|
||||
|
Quote:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com/$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301]
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|