Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12391
Latest: ACS
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 40455
Total Topics: 7111
Most Online Today: 65
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 48
Total: 48

Author Topic: Direct access to picture files via browser  (Read 4335 times)

0 Members and 1 Guest are viewing this topic.

Offline ziissi

  • Newbie
  • *
  • Posts: 6
    • View Profile
Direct access to picture files via browser
« 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.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15217
    • View Profile
Re: Direct access to picture files via browser
« 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.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline ziissi

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Direct access to picture files via browser
« Reply #2 on: July 23, 2007, 12:52:17 pm »
Thanks for the tip. This one worked for me:

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

Offline ziissi

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Direct access to picture files via browser
« 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?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15217
    • View Profile
Re: Direct access to picture files via browser
« 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.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline ziissi

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Direct access to picture files via browser
« 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/

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
4365 Views
Last post September 19, 2007, 04:16:40 pm
by SMFHacks
3 Replies
4695 Views
Last post June 18, 2008, 08:52:04 pm
by کŋ
2 Replies
6999 Views
Last post October 19, 2008, 02:45:50 pm
by Darkshadow
4 Replies
2978 Views
Last post July 28, 2012, 11:16:47 pm
by MasterWho
1 Replies
347 Views
Last post October 18, 2020, 05:47:56 am
by Alistair

+- Recent Topics

Problem mit PHP 7.3 + 7.4 by SMFHacks
November 26, 2020, 09:13:20 am

End of Year Sale SMFHacks 2020 by SMFHacks
November 24, 2020, 08:35:13 pm

[Mod] Tagging System by SMFHacks
November 23, 2020, 06:25:59 pm

Additional Recommendations for SMF Store by SMFHacks
November 20, 2020, 11:19:13 pm

smf gallery Pro --> link to yotube/vimeo? Web Responsive to clik images? by Rock Lee
November 19, 2020, 10:10:37 pm

Payment method by SMFHacks
November 10, 2020, 11:54:47 pm

Need Help with Coppermine Conversion by SMFHacks
November 04, 2020, 01:24:09 pm

Feature Request for Classifieds by SMFHacks
October 21, 2020, 10:30:17 pm

[Mod] ezPortal by Alistair
October 18, 2020, 11:00:17 am

ezPortal homepage on mobile browser (SMF 2.1 RC3) by Alistair
October 18, 2020, 05:47:56 am

Powered by EzPortal