Jump to:

23355 Posts in 17734 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Problems accessing folders

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: 1187 Views
  • Daimz
    Avatar
    Community Member
    36 Posts

    Problems accessing folders Link to this post

    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?

  • ampedup
    Avatar
    Community Member
    133 Posts

    Re: Problems accessing folders Link to this post

    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*

  • Daimz
    Avatar
    Community Member
    36 Posts

    Re: Problems accessing folders Link to this post

    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.

  • woodb2
    Avatar
    Community Member
    48 Posts

    Re: Problems accessing folders Link to this post

    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]

  • Daimz
    Avatar
    Community Member
    36 Posts

    Re: Problems accessing folders Link to this post

    that worked perfectly! Thanx so much!

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