Blog
Documentation
Book a Demo
toggle menu
Categories
Discussions
Activity
Best Of...
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Activity
Best Of...
Sign In
·
Register
×
Home
›
Vanilla 2.0 - 2.8
Discussion
re-write www to non www
Author
Date within
1 day
3 days
1 week
2 weeks
1 month
2 months
6 months
1 year
of
Examples: Monday, today, last week, Mar 26, 3/26/04
Search
Please upgrade
here
.
These earlier versions are no longer being updated and have security issues.
HackerOne users
: Testing against this community violates our program's Terms of Service and will result in your
bounty being denied
.
re-write www to non www
smcilreavy
March 2011
edited March 2011
in
Vanilla 2.0 - 2.8
Hi Guys,
Im using the defaul .htaccess file that comes with vanilla.
My forum sites in a filder /forum
Does anyone know what to add to the .htaccess file to re-write all www URLs to non www.
Have tried a bunch of things but no joy.
Any examples would be helpful!
Tagged:
seo
rewrite
0
Comments
Linc
Admin
March 2011
This isn't really Vanilla-specific, but here it is:
After "RewriteEngine On" add this (obviously substituting your domain name):
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$
http://example.com/$1
[R=301,L]
0
Sign In
or
Register
to comment.
Comments
After "RewriteEngine On" add this (obviously substituting your domain name):
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]