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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

secure the assets folder


Go to End


19 Posts   8121 Views

Avatar
malinux

Community Member, 23 Posts

22 September 2009 at 9:17am

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]

Avatar
x75

Community Member, 43 Posts

22 September 2009 at 11:31pm

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

Avatar
x75

Community Member, 43 Posts

23 September 2009 at 10:49pm

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

Go to Top