17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 5153 Views |
-
getting 400 Bad Request error - probably a simple .htaccess problem

15 February 2008 at 7:17am
I just installed silverstripe, and everything is working fine, but when I try to visit my site (e.g. http://www.mysite.ca/silverstripe) I get a 400 "bad request" error, unless I throw on the trailing slash (http://www.mysite.ca/silverstripe/).
I'm betting a simple change to the .htaccess file will resolve this, but I don't know what commands to enter. Any help would be most appreciated.
-
Re: getting 400 Bad Request error - probably a simple .htaccess problem

23 February 2008 at 3:36pm
Change:
RewriteCond %{REQUEST_URI} ^(.*)$
To:
RewriteCond %{REQUEST_URI} ^(.*)/$
On line 7 of the .htaccess file. That should fix it.
Ofir
-
Re: getting 400 Bad Request error - probably a simple .htaccess problem

25 August 2008 at 2:23pm Last edited: 25 August 2008 3:14pm
almost fixed my problem. Almost. Login for admin still doesn't work.
Kjo
-
Re: getting 400 Bad Request error - probably a simple .htaccess problem

12 October 2008 at 6:41am
I've got the same problem here. Adding the forward slash as described above only works for the home directory and breaks every sub-directory. Any suggestions?
-
Re: getting 400 Bad Request error - probably a simple .htaccess problem

15 October 2008 at 3:37am Last edited: 15 October 2008 3:41am
I am also facing the same problem, any suggestion or fix will be helpful.
Thanks!
-
Re: getting 400 Bad Request error - probably a simple .htaccess problem

15 October 2008 at 9:14am
I had a similar problem on my local wamp-server.
May be you can try this in your .htaccess...
### SILVERSTRIPE START ###
<IfModule mod_dir.c>
DirectorySlash On
</IfModule>
...
...
... -
Re: getting 400 Bad Request error - probably a simple .htaccess problem

12 November 2008 at 7:01am Last edited: 12 November 2008 7:05am
Added two lines after RewriteBase:
### SILVERSTRIPE START ###
RewriteEngine On
RewriteBase /my/siteRewriteCond %{REQUEST_URI} site$
RewriteRule (.*) $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]
### SILVERSTRIPE END ###Tested it lightly, seems to work ok, including accessing menus from the uri without the trailing slash, i.e. /my/site/admin and /my/site/admin/ both work.
| 5153 Views | ||
|
Page:
1
|
Go to Top |


