Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » secure the assets folder

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 2 3
Go to End
Author Topic: 5396 Views
  • malinux
    Avatar
    Community Member
    23 Posts

    Re: secure the assets folder Link to this post

    My .htaccess in a secure folder ends up like this:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteRule (.*) sapphire/main.php?url=%1&%{QUERY_STRING} [L]

  • x75
    Avatar
    Community Member
    42 Posts

    Re: secure the assets folder Link to this post

    Hi, thanks for your answer.

    That is exactly what my .htaccess file looks like. Maybe I have a config error somewhere else?

    Just in case, this is my .htaccess file in the root of this web:

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

    Any Idea where else I could search for a solution?

    Thanks
    Johannes

  • x75
    Avatar
    Community Member
    42 Posts

    Re: secure the assets folder Link to this post

    Ok, I found something:
    http://www.silverstripe.org/installing-silverstripe/show/254742?start=8#post260586

    The Problem seems to be the way SS handles nested Folders in 2.3

    But after changing the code as suggested, my image_gallery broke. Now it won't resample Images in secured folders. I remerber reading about a problem with resampled images and security on this forum, but I can't find it anymore.

    Any help would be great!

    Thanks
    Johannes

    5396 Views
Page: 1 2 3
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.