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

Mobile Subdomain Redirect Question


Go to End
Reply

9 Posts   2073 Views

Avatar
DanStephenson

29 October 2011 at 12:00pm Community Member, 115 Posts

Hello,

We're setting up our web server so it has 2 sites on it - our desktop site in the web root, and a mobile site in the /mobile directory.

I am trying to setup the domain m.mysite.com for the mobile website. However, whenever I try to setup this subdomain, cPanel tries to redirect the subdomain to silverstripe_cache.

How can I fix this, so I can make the m. subdomain work correctly?

Avatar
MateuszU

31 October 2011 at 9:12am Community Member, 89 Posts

How do you know it redirects to silverstripe_cache? Did you check .htaccess?

m

Avatar
Scott Farmer

31 October 2011 at 11:32am Community Member, 35 Posts

Are you sure you have setup m.mysite.com correctly using cpanel? Depending on how you did it, adding a sub domain will act as a different site. You want to add a domain alias.

Cheers
Scott

Avatar
DanStephenson

1 November 2011 at 5:06am Community Member, 115 Posts

Hi Scott,

Do I really want a domain alias? Our mobile site is a completely separate site from the desktop version - not just a different stylesheet.

Avatar
Scott Farmer

1 November 2011 at 9:46am Community Member, 35 Posts

Hi Dan,

I'm assuming you are using the silverstripe mobile module to redirect to the mobile domain? If so it is one site with two different themes. Desktop and mobile.

Otherwise true you wouldn't want a alias, just setup two different hosting plans.

Regards
Scott

Avatar
DanStephenson

1 November 2011 at 10:40am (Last edited: 1 November 2011 10:52am), Community Member, 115 Posts

Hi Scott,

The mobile module has a couple of options, a theme on the same site, or a different site. We're opting for the "different site" option. I've attached a screenshot of our mobile tab.

Two hosting plans isn't really what we want, as I don't think we can make a separate hosting account for a subdomain. I've put the whole mobile site into a "mobile" folder, and want to have the m. subdomain redirect there.

Attached Files
Avatar
Scott Farmer

1 November 2011 at 11:13am Community Member, 35 Posts

Hi Dan,

Does the two sites share common pages and content? That is why with theming you can have a different looking site, but same content etc.

Did you just copy entire silverstripe install folder into sub folder /mobile? If so this wont work as you would need two different hosting plans. Hence why mobile module and themes allows you to have two sites, but sharing same code and content etc.

Regards
Scott

Avatar
DanStephenson

1 November 2011 at 11:16am Community Member, 115 Posts

It's all different code, page content, etc. The mobile site is a "light version" of our main site, and doesn't have all the same pages. They are very different sites.

Go to Top