Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

301 Redirect


Reply

4 Posts   1668 Views

Avatar
corkg

15 October 2008 at 7:42am Community Member, 30 Posts

Hi

How can i make my site redirect so that:

http://mysite.com
goes to
http://www.mysite.com

like on the http://www.demconvention.com/ website which is silverstripe

Thanks

Avatar
simon_w

15 October 2008 at 8:08am Forum Moderator, 474 Posts

Add:

Director::forceWWW()

to mysite/_config.php.

Or set up a rule in .htaccess that does it for you.

Avatar
corkg

15 October 2008 at 8:14am Community Member, 30 Posts

thanks
works like a dream

Avatar
Liam

15 October 2008 at 8:40am Community Member, 470 Posts

Neat, never knew you could add that to your config. Always did it through .htaccess.