Hey guys,
I'm having an .HTACCESS issue that I hope someone can help with. I have done a lot of Google searching but haven't found a solution that worked.
It is a similar issue to this: http://silverstripe.org/archive/show/35627
Anyway, my SS site is in a subfolder on my main hosting path, called sssite in this example.
If I access the site with a slash after the name it works fine: http://www.website.com/sssite/, if I omit the slash then I get the 400 Bad Request error.
Here is my .HTACCESS file:
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>
<Files web.config>
Order deny,allow
Deny from all
</Files>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###
If I change the line 5 up from the bottom to: RewriteCond %{REQUEST_URI} ^(.*)/$, then the site will come up fine with no slash, but then when I try to access pages within the site, i.e. http://www.website.com/sssite/page1, I get a "PAGE NOT FOUND" error.
I also played around with modifying the other .HTACCESS file in my root hosting to specifically add a slash when the sssite name is requested, but that didn't work either.
Does anyone have any ideas?