Non-www to www.

Zaborg

Web Designer
Joined
Jul 3, 2010
Messages
2,713
Reaction score
2
FP$
5,146
Hello!

I'm trying to change my .htaccess and add a redirection from all non-www pages to www. I know it's possible and I tried to Google it but couldn't really find anything reliable.


Thanks for help,
Zaborg
 
I posted a guide here for xenforo, it could be easily modified 🙂

Find

Code:
RewriteEngine On

or

Code:
RewriteEngine Off
(If it says off change it to on)


Add after

Code:
RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule ^ http://www.yourdomain.com%{REQUEST_URI} [L,R=301]

changing yourdomain.com to your domain name 🙂
 
I remember something about that guide and for some reason couldn't find it...
I'll try it now.<br /><br />-- 05 Aug 2011, 23:58 --<br /><br />It worked! Thanks! 😀
 
Got a problem.
Can't use this with SEO Mod.

All submit buttons go bugged with this. (They just refresh the page)

SEO htaccess:

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
 
Back
Top Bottom