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.

We've moved the forum!

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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

.htaccess and sub domain names


Go to End


2 Posts   1086 Views

Avatar
Parker1090

Community Member, 46 Posts

19 August 2011 at 4:55am

Hi All,
I'm a bit new to SilverStripe, so please forgive me if this is simple to solve. I have searched, and found nothing, so hopefully someone can help me.

I have a domain name (abc.co.uk) set up with SilverStripe. I also have a sub domain name (sub.abc.co.uk) which hosts a particular piece of software, but is inaccessible. Trying to access the sub domain name (or another other, regardless of existence) simply takes me back to the main site homepage (powered by SilverStripe). I'm assuming it's the .htaccess file, but I could be wrong - as I said, I'm new to all this, so any help would be massively appreciated.

Thanks in advance
Matt

Avatar
Willr

Forum Moderator, 5523 Posts

19 August 2011 at 1:01pm

I assume your configuration is set to point both site and subdomain to the same folder? I would see first if you could set up the subdomain in another directory. Otherwise you will want to edit the .htaccess file so that requests to that subdomain are ignored, something like

RewriteCond %{HTTP_HOST} sub.domain.com

You'll find more information about .htaccess online (lots of tutorials, blog posts about it)