Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » slash or no slash bad request

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: 1541 Views
  • kjello
    Avatar
    Community Member
    7 Posts

    slash or no slash bad request Link to this post

    I was so impressed with SilverStripe that I installed it on my live server. First problem I encountered was that I had to manually set the permissions. I did not expect this since I unpacked the compressed file right on the server. It was the assets, tutorial, mysite folders and the .htaccess file. I had to change them all to 777. Does anyone know what the permissions are supposed to be post install?

    After installing the system when I visit the site with no slash I get a "400 Bad Request" Your browser sent a request that this server could not understand. I've checked with the server requirements and there are no issues. The really weird thing is that if I go to the site with a "/" at the end of it, it works just fine. This will be way too confusing. Please HELP!

    The site is http://www.movingworship.com/cms - doesn't work
    http://www.movingworship.com/cms/ - does work.
    Hosting is by A Small Orange. I've already checked with them and they say that it's something in SS scripting.

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: slash or no slash bad request Link to this post

    I have a few guesses.

    1. Its a problem with your .htaccess file.
    2. cms is the name of a folder, and when you leave the "/" off the end, the browser doesn't go to it like a folder.

    I am leaning towards guess 1.

    Also, if you are going to post the site url, try setting the user and password to something else

    You could just say:
    http://mysite.com/cms - doesn't work
    http://mysite.com/cms/ - works

  • kjello
    Avatar
    Community Member
    7 Posts

    Re: slash or no slash bad request Link to this post

    Good call, I didn't even think about the user/pass. Anyway I trashed the install on the hunch that the cms directory I put SS in might be competing with the cms directory in silver. And I changed the username and password.

    So I'm worthless with .htaccess files. Any thoughts. I didn't change the .htaccess from it's original packaged self. See below. Any other info needed?

    ### SILVERSTRIPE START ###
    RewriteEngine On
    RewriteBase /silver

    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 ###

  • kjello
    Avatar
    Community Member
    7 Posts

    Re: slash or no slash bad request Link to this post

    answer to question:

    http://silverstripe.com/site-builders-forum/flat/35627?showPost=153529

    Only partially. . . so I changed line 7 to:

    RewriteCond %{REQUEST_URI} ^(.*)/$

    which adds the / before the $. It worked, but admin can't load without the slash either. Logout doesn't work either. I'm pretty confused and I don't even know where to begin with .htaccess files. Anymore help out there?

    1541 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.