Jump to:

23370 Posts in 18160 Topics by 2864 members

General Questions

SilverStripe Forums » General Questions » Non SS Subdomain Issue

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

Page: 1
Go to End
Author Topic: 964 Views
  • Sophie
    Avatar
    Community Member
    33 Posts

    Non SS Subdomain Issue Link to this post

    Under SS 2.2.x I was able to install a subdomain on a site and have it work separately from SS by modifying the .htaccess file to read:

    ### SILVERSTRIPE START ###
    RewriteEngine On
    RewriteRule ^subdomaindirectory$ - [L]
    RewriteRule ^subdomaindirectory/.* - [L]
    RewriteBase /

    RewriteCond %{REQUEST_URI} !(^$)|(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$

    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    ### SILVERSTRIPE END ###

    With the advents of 2.3 when I add a subdomain I receive the following message.

    The requested URL /sapphire/main.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    If I attempt to modify the .htaccess to include the following code as I did under 2.2 outlined above, this does not work.

    RewriteRule ^subdomaindirectory$ - [L]
    RewriteRule ^subdomaindirectory/.* - [L]

    Any help would be appreciated. I really need to get this subdomain up and running!

    Thanks!

  • maryluke
    Avatar
    Community Member
    9 Posts

    Re: Non SS Subdomain Issue Link to this post

    I have the same issue: ss 2.3.3 on root, non-ss on subdomain "shop". Will not work with subdomain at all, same error. Please assist! Thanks loads.

  • LoZzA
    Avatar
    Community Member
    11 Posts

    Re: Non SS Subdomain Issue Link to this post

    It looks like a lot of people are having this issue, including me!

    BUT it looks like there is a simple solution, well, it worked for me. See this tread...

    http://silverstripe.org/general-questions/show/268289?start=0#post269856

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Non SS Subdomain Issue Link to this post

    Just place your own .htaccess with your own rewrite rules in the subdomain folder. If you don't need URL rewriting, enter the following in the subdomain .htaccess:

    <IfModule mod_rewrite.c>
    RewriteEngine Off
    </IfModule>

    Edit: spelling

  • maryluke
    Avatar
    Community Member
    9 Posts

    Re: Non SS Subdomain Issue Link to this post

    Thank you so much, this one works for me, and I like it better than the previous because its so clean. You're a gem!

    964 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.