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   1330 Views

Avatar
gooberguy

Community Member, 9 Posts

11 April 2010 at 12:33pm

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

Forum Moderator, 5513 Posts

11 April 2010 at 2:06pm

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

Avatar
gooberguy

Community Member, 9 Posts

11 April 2010 at 6:30pm

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

Community Member, 9 Posts

12 April 2010 at 8:42am

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

Community Member, 9 Posts

12 April 2010 at 12:16pm

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

Community Member, 9 Posts

13 April 2010 at 5:23pm

bumpin it up - this is urgent for me =\

Avatar
3dgoo

Community Member, 133 Posts

23 April 2010 at 11:55am

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