Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 208
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 197
Total: 197

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

0 Members and 1 Guest are viewing this topic.

Offline ziissi

  • Member
  • *
  • 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: 16452
    • 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

  • Member
  • *
  • 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

  • Member
  • *
  • 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: 16452
    • 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

  • Member
  • *
  • 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
5659 Views
Last post September 19, 2007, 04:16:40 pm
by SMFHacks
3 Replies
5634 Views
Last post June 18, 2008, 08:52:04 pm
by کíŋ
2 Replies
8369 Views
Last post October 19, 2008, 02:45:50 pm
by Darkshadow
4 Replies
4073 Views
Last post July 28, 2012, 11:16:47 pm
by MasterWho
1 Replies
3062 Views
Last post October 18, 2020, 05:47:56 am
by Alistair

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal