Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Archive
SilverStripe Forums » Archive » How to Redirect WWW to Non-WWW with htacess
Our old forums are still available as a read-only archive.
|
Page:
1
|
Go to End | |
| Author | Topic: How to Redirect WWW to Non-WWW with htacess | 531 Views |
-
How to Redirect WWW to Non-WWW with htacess

26 October 2008 at 9:33am Last edited: 26 October 2008 9:36am
I usually do this in the htacess:
RewriteCond %{http_host} ^www.mywebsite.com/ [NC]
RewriteRule ^(.*)$ http://mywebsite.com/$1 [R=301,NC]but it isn't working. Any suggestions?
thanks,
Clint -
Re: How to Redirect WWW to Non-WWW with htacess

26 October 2008 at 10:48am Last edited: 26 October 2008 10:52am
RewriteCond %{HTTP_HOST} ^www.simon.geek.nz$
RewriteRule ^(.*)$ http://simon.geek.nz/$1 [R=301,L]Works fine for me. Note, there's no trailing slash on the domain name, which appears to be your problem.
-
SOLVED - Re: How to Redirect WWW to Non-WWW with htacess

26 October 2008 at 11:04am
I changed the "/" to a "$" and I also had to specify the RewriteRule as the Last rule with the "L".
Thanks for your help.
| 531 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: turtleline
Welcome to our latest member: fearofbuttons


