PDA


View Full Version : Simple redirect from domain.net to www.domain.net


Borgs8472
07-09-2005, 08:32 AM
Hey all.

CMPS works fine from both http://www.wordforge.net AND http://wordforge.net , however in the latter's case, the login cookie is not recognised and users appear to be logged out.

What's a quick way for the latter to redirect to the former?

Ta :)

Brian
07-09-2005, 11:22 AM
Add a .htaccess file with this content:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite\.com
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=permanent,L]

Borgs8472
07-09-2005, 01:30 PM
You're too good to us Brian :)

Thanks a million.

ConqSoft
07-09-2005, 02:07 PM
Just an FYI, if you change your vBulletin cookie domain to:

.wordforge.net

The cookie will work with either one. (Note the period at the beginning.)

COBRAws
07-10-2005, 01:42 PM
Add a .htaccess file with this content:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite\.com
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=permanent,L]
i was needing that! :D

for some strange reasong, what ConqSoft said wont work for me. Weird huh, been trying to make it work for... around 4 months and nothing :P So i quit

Anyway i dont care about cookies, now im moving host so I hope its fixed.


--EDiT--
This is also great if you care about Google PageRank or Alexa, so you wont have 2 main pages like www. and without www.
Its just one and hits are transferred to the ww.yourdomain.tld
:D