Jump to:

23455 Posts in 18904 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » mysite.com/test wont open the index file

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 1245 Views
  • gooberguy
    Avatar
    Community Member
    9 Posts

    mysite.com/test wont open the index file Link to this post

    i've installed silverstripe in a directory named test on my 1and1 hosting. and yet when i go to mysite.com/test it does not open the index.php file automatically.

    I have to actually type in my address bar mysite.com/test/index.php to get to it.

    is there anyway to change this?

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: mysite.com/test wont open the index file Link to this post

    Is mod_rewrite enabled and your .htaccess file exists in the test folder?

  • gooberguy
    Avatar
    Community Member
    9 Posts

    Re: mysite.com/test wont open the index file Link to this post

    this is odd...

    i reinstalled silverstripe and it seemed to work for a while. (this time i moved modification to my .htaccess file to the begging of it, modifications i needed to do for 1and1)

    now when i go to the site i get a 400 bad request error

    "Bad Request

    Your browser sent a request that this server could not understand."

    whereas before i would just get my hostings 404 error.

    i can usually get rid of this by clearing cookies and restarting the browser. so i figured it would be fine, but when i sent the link to my friend, he got the same 400 bad request error!

    any insight?

  • gooberguy
    Avatar
    Community Member
    9 Posts

    Re: mysite.com/test wont open the index file Link to this post

    here is my .htaccess file which im sure is causing the problem...

    ### SILVERSTRIPE START ###
    AddType x-mapp-php5 .php
    <Files *.ss>
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    </Files>

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /test

    RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)

    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    </IfModule>
    ### SILVERSTRIPE END ###

  • gooberguy
    Avatar
    Community Member
    9 Posts

    Re: mysite.com/test wont open the index file Link to this post

    I can fix the error I am having by changing

    RewriteCond %{REQUEST_URI} ^(.*)$

    to

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

    but then i get 404 errors when trying to access /admin

    ugh this is so frustrating, please help!

  • gooberguy
    Avatar
    Community Member
    9 Posts

    Re: mysite.com/test wont open the index file Link to this post

    bumpin it up - this is urgent for me =\

  • 3dgoo
    Avatar
    Community Member
    133 Posts

    Re: mysite.com/test wont open the index file Link to this post

    Maybe the server can't handle Silverstripe sites. Have you installed the site, or just unpacked it.

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