Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Allowing non-SS subfolders

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 4835 Views
  • sarahk
    Community Member
    46 Posts

    Allowing non-SS subfolders Link to this post

    This came up about a year ago and I'd hoped it would be addressed by now.

    I have created a subdomain to manage some content. Lets call it content.mysite.com

    My hosting creates a folder called public_html/content/ and all the scripts, images etc go in there.

    I've got SS sitting in public_html but it won't allow me access to either the subdomain or the folder.

    Is there a marker file I can put in my "content" folder to tell SS to ignore it?



  • 3dkiwi
    Community Member
    17 Posts

    Re: Allowing non-SS subfolders Link to this post


    I actually have a complete ss installation in a sub directory of a ss installation. To make sure the top ss installation passes all requests for the lower one I have the following .htaccess file in the top ss installation:

    RewriteEngine On

    RewriteBase /

    RewriteRule ^familytrees$ familytrees/ [R,L]
    RewriteRule ^familytrees/(.*)$ familytrees/$1 [L]

    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]

    The RewriteRules means that any request coming in that starts with /familytrees is passed through to the lower ss installation in the familytrees subdirectory. All other requests are handled by the normal ss handler.

    Check out www.pyenet.co.nz and www.pyenet.co.nz/familytrees to see the effect.


  • sarahk
    Community Member
    46 Posts

    Re: Allowing non-SS subfolders Link to this post

    works a treat

    thank you

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.