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.

General Questions /

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

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

.htaccess and sub domain names


Reply


2 Posts   718 Views

Avatar
Parker1090

Community Member, 38 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, 5513 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)