Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

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

mysite.com/test wont open the index file


Reply

7 Posts   1256 Views

Avatar
gooberguy

11 April 2010 at 12:33pm Community Member, 9 Posts

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?

Avatar
Willr

11 April 2010 at 2:06pm Forum Moderator, 5511 Posts

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

Avatar
gooberguy

11 April 2010 at 6:30pm Community Member, 9 Posts

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?

Avatar
gooberguy

12 April 2010 at 8:42am Community Member, 9 Posts

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

Avatar
gooberguy

12 April 2010 at 12:16pm Community Member, 9 Posts

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!

Avatar
gooberguy

13 April 2010 at 5:23pm Community Member, 9 Posts

bumpin it up - this is urgent for me =\

Avatar
3dgoo

23 April 2010 at 11:55am Community Member, 133 Posts

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