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
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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
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.
I changed the "/" to a "$" and I also had to specify the RewriteRule as the Last rule with the "L".
Thanks for your help.