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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

How to use a subdomain in the same SS install


Reply


869 Views

Avatar
nicktacular

Community Member, 8 Posts

6 May 2010 at 2:54am

Edited: 06/05/2010 2:58am

Hi there,

Currently I have a SS installation for a domain, example.com in a directory /mywebroot.

What I am trying to do is to create a subdomain such as customapi.example.com which will use a a particular controller such as /mywebroot/custom/code/MyCustom.php.

I can already access this controller by accessing example.com/customabc because I defined the routes in my /mywebroot/custom/_config.php. However, I wish to have this controller accessible from the root of the subdomain customapi.example.com so that it runs the controller called MyCustom_Controller inside /mywebroot/custom/code/MyCustom.php as the default controller.

Is this possible? If so, is this something to address inside /mywebroot/.htaccess, or is this a module, or....?

I would appreciate any pointers!

Thanks,

Nick