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

Mobile Subdomain Redirect Question


Go to End


9 Posts   5067 Views

Avatar
DanStephenson

Community Member, 116 Posts

29 October 2011 at 12:00pm

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

Community Member, 89 Posts

31 October 2011 at 9:12am

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

m

Avatar
Scott Farmer

Community Member, 49 Posts

31 October 2011 at 11:32am

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

Community Member, 116 Posts

1 November 2011 at 5:06am

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

Community Member, 49 Posts

1 November 2011 at 9:46am

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

Community Member, 116 Posts

1 November 2011 at 10:40am

Edited: 01/11/2011 10:52am

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

Community Member, 49 Posts

1 November 2011 at 11:13am

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

Community Member, 116 Posts

1 November 2011 at 11:16am

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