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   1727 Views

Avatar
corkg

Community Member, 30 Posts

15 October 2008 at 7:42am

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

Forum Moderator, 474 Posts

15 October 2008 at 8:08am

Add:

Director::forceWWW()

to mysite/_config.php.

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

Avatar
corkg

Community Member, 30 Posts

15 October 2008 at 8:14am

thanks
works like a dream

Avatar
Liam

Community Member, 470 Posts

15 October 2008 at 8:40am

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