Hi everyone,
Discussed on this thread is a problem with hosting a SilverStripe site
alongside another application:
http://www.silverstripe.org/general-questions/show/255398?start=0#post263135
For example, if you have a phpBB forum hosted at
http://www.example.com/phpbb/
and a SilverStripe site hosted at
http://www.example.com/, then it
won't work, because phpbb/ isn't a file, it's a directory
The solution is to edit the .htaccess file in the root of your site
Change this:
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
To this:
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
In other words, add the "-d" line.
My question is - should we put this in the default install of a future
release? What this would mean is that URLs like /assets, /sapphire, /
cms/, and /jsparty could never be used in a SilverStripe application.
Alternatively, we could get more fancy and still process the URL with
SilverStripe in situations where the directory was part of the
SilverStripe, perhaps by looking for a (rootdir)/_config.php file, as
we do in the manifest. Although I'm not sure if that will make the
URL handling too tweaky and complex, and make it more difficult to
port to servers other than Apache.
Thoughts?