SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 21, 2012, 08:46:48 am

Login with username, password and session length
Members
Total Members: 10065
Latest: yaser1984
Stats
Total Posts: 28681
Total Topics: 4975
Online Today: 58
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 2
Guests: 53
Total: 55
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Direct access to picture files via browser  (Read 2316 times)
ziissi
Newbie
*
Offline Offline

Posts: 6


View Profile
« 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.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9676


View Profile
« Reply #1 on: July 20, 2007, 08:01:18 pm »

I believe with apache you can create a rewrite that will allow stopping of hot linked images if they come from another site.
Logged
ziissi
Newbie
*
Offline Offline

Posts: 6


View Profile
« Reply #2 on: July 23, 2007, 12:52:17 pm »

Thanks for the tip. This one worked for me:

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^.*\.mydomain.com/.*$ [NC]
RewriteRule .*\.(jpe?g|png|gif|bmp) - [NC,F,L]
Logged
ziissi
Newbie
*
Offline Offline

Posts: 6


View Profile
« Reply #3 on: July 24, 2007, 12:46:51 am »

btw, is it possible to move gallery directory out of /public_html directory and still get the gallery working in forum?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9676


View Profile
« Reply #4 on: July 24, 2007, 06:58:06 am »

No cause it still needs to be able to find the images in order to display them.
Logged
ziissi
Newbie
*
Offline Offline

Posts: 6


View Profile
« Reply #5 on: July 27, 2007, 05:33:01 am »

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/
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 08:37:35 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]

[May 17, 2012, 12:38:16 pm]

[May 15, 2012, 09:32:27 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 4.711 seconds with 18 queries.