SMFHacks.com
SMF Gallery Pro => Support => Topic started by: ziissi on July 20, 2007, 09:12:29 am
-
Hi! First of all, SMF Gallery Pro a great mod for our purpose. Is there anyway to deny direct access to gallery folder via browser? I now there's a index.php -file that rejects the listing of folder but in that case that someone knows direct URL to the picture. Pictures are know with 644 permission and gallery folder itself 755. Uploading the pictures is working ok.
-
I believe with apache you can create a rewrite that will allow stopping of hot linked images if they come from another site.
-
Thanks for the tip. This one worked for me:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^.*\.mydomain.com/.*$ [NC]
RewriteRule .*\.(jpe?g|png|gif|bmp) - [NC,F,L]
-
btw, is it possible to move gallery directory out of /public_html directory and still get the gallery working in forum?
-
No cause it still needs to be able to find the images in order to display them.
-
For example some wiki systems can read their content (e.g. text files) from non public directory. To clarify things, you can place content under /home/username/data/ and the wiki itself is installed under /home/username/public_html/