Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 186
Total: 186

Author Topic: Direct access to picture files via browser  (Read 5624 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: 16436
    • 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: 16436
    • 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
5647 Views
Last post September 19, 2007, 04:16:40 pm
by SMFHacks
3 Replies
5625 Views
Last post June 18, 2008, 08:52:04 pm
by کíŋ
2 Replies
8352 Views
Last post October 19, 2008, 02:45:50 pm
by Darkshadow
4 Replies
4068 Views
Last post July 28, 2012, 11:16:47 pm
by MasterWho
1 Replies
3022 Views
Last post October 18, 2020, 05:47:56 am
by Alistair

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

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

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal