Author Topic: protect the image links  (Read 5777 times)

0 Members and 1 Guest are viewing this topic.

Offline trnggiang

  • Pre-Newbie
  • Posts: 2
    • View Profile
protect the image links
« on: November 20, 2002, 11:59:18 AM »
Thankz for the great script. :)

BTW, is there anyway we can protect the image links?  Don't want members to upload stuffs then get the links to other sites. :)


EX:


and here is the full size pic w/o register


Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
protect the image links
« Reply #1 on: November 20, 2002, 12:20:31 PM »
Maybe try this:

Put a .htaccess file in the data directory with the follwing content:

Code: [Select]
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com [NC]
RewriteRule [^/]+.(.*)$ http://www.yourdomain.com/accessdenied.gif [R,L]


Replace yourdomain.com.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
protect the image links
« Reply #2 on: November 24, 2002, 08:53:12 PM »
finaly I figured out why my apache couldnt start when I anabled rewriteengine.
and with this script it's really doesnt let anyone access files. but as usual there is something else came up.
now video and audio files dont play from the page. mediaplayer plugin cant play files, it sais:
Quote
Cannot open.  Please verify that the path and filename are correct and try again.


but download button works fine.

P.S. with this .htaccess file peole cant use security software, that disable referal page.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)