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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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

One website, two domain names?

Go to End

4 Posts   1695 Views


Community Member, 110 Posts

3 September 2009 at 8:20pm

I have a website which is split into two, as there are two distinct parts of the business. I would like each to have its own domain name. The second domain name is parked on the server, so whether a visitor enters or, they are directed to the "normal" homepage.

I would like users entering to continue to go to the "normal" homepage, and users entering to go to /domain2/

I had thought that this would be a simple case of putting a 301 redirect on the server, but that doesn't work for some reason.

My host has suggested .htaccess rewrites, but I don't know if this would work (and have no idea how to do it anyway).

Can anybody help me, please?


Community Member, 110 Posts

9 September 2009 at 8:41pm

My host has been looking into this for me too, but we still have no answers. Can anybody help, please?



Forum Moderator, 5523 Posts

9 September 2009 at 8:51pm

Maybe something like

RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

That will redirect everything from domain2 to that bottom url using a 301.


Community Member, 110 Posts

10 September 2009 at 8:32pm

Thanks for your reply.

Unfortunately, my host and I have tried that and it doesn't work.

In their words: "I tried adding rewrites to your .htaccess but it follows that if your redirecting the root to a subfolder, and your parking a domain onto the route, the parked domain will point to the same place as the main domain."

Is there any other way around this?