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

Problems accessing folders


Reply


5 Posts   1243 Views

Avatar
Daimz

Community Member, 36 Posts

20 May 2010 at 10:46am

Hi,
I have been having problem accessing other files on my server since installing silverstripe. Before I had Silverstripe I could go to http://www.arctosdesign.com/damienm/ and have no problems it would just go straight there. Now I get a Silverstripe Error I dont want Silverstripe having anything to do with that folder. How can I stop this?

Avatar
3dgoo

Community Member, 133 Posts

20 May 2010 at 12:53pm

You need to edit your .htaccess file to do this.

This post has the solution:
http://www.silverstripe.org/archive/show/168226

In your .htaccess above RewriteCond %{REQUEST_URI} ^(.*)$ put the following:

RewriteCond %{REQUEST_URI} !/damienm*

Avatar
Daimz

Community Member, 36 Posts

21 May 2010 at 9:03am

Well I gave it a try but I am still getting problems.
This is how the .htaccess is set up

# Use PHP5 as default
AddHandler application/x-httpd-php5 .php

### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} !/damienm*
RewriteCond %{REQUEST_URI} !/arctosdesign*
RewriteCond %{REQUEST_URI} !/metcalf*
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###

If I navigate to http://www.arctosdesign.com/damienm it is totally fine I can see wordpress. But if I go to http://www.damienm.com/ I get an error like this:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@damienm.arctosdesign.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.15 (CentOS) mod_ssl/2.2.15 0.9.8l DAV/2 mod_auth_passthrough/2.1 FrontPage/5.0.2.2635 Server at www.damienm.com Port 80

I had a chat with the guys hosting my website and they said it was something to do with the .htaccess and how it's been set up.

Can any one help I am not a coder and I don't understand what is going on in the .htaccess .
Thanx.

Avatar
woodb2

Community Member, 48 Posts

22 May 2010 at 2:09am

I have a folder inside my silverstripe install called "files". I add the following lines to my .htaccess file after the RewriteEngine On line

RewriteRule ^files$ files/ [R,L]
RewriteRule ^files/(.*)$ files/$1 [L]

After adding that, silverstripe doesn't try to manage that directory.

I don't have any of the RewriteCond statements that you have.

I'm pretty sure this should work for you:

RewriteRule ^damienm$ damienm/ [R,L]
RewriteRule ^damienm/(.*)$ damienm/$1 [L]

Avatar
Daimz

Community Member, 36 Posts

22 May 2010 at 11:31am

that worked perfectly! Thanx so much!