Jump to content

Making Pictures "non-remotable"


Aknot

Recommended Posts

I have/will have over 150 (if not more) scans of Sports cards I own. I already have the makings of the "list" that shows card number, year, company, player. Along with that if I have a scan of it opening in another window when "clicked".

 

I want to make it so the scans/pictures can not be "remote linked". (is that the right term?)

 

Meaning I can do this:

 

topps84-123.jpg

 

Now but I do not want people (even me) to be able to do that.

 

How would I go about doing that? Also creating an "error" message for soemone that does attempt to remote link.

 

Thanks.

Link to comment
Share on other sites

you just turn it on, and then in the Urls to Allow Access: box put the urls like www.example.com in their. Then if you want a little page to come up if they try to link to your site you just put in a page name in the next box below the allow url and then it will turn it on. It is really easy to do, and it the only way to keep other sites from linking to your images.

Link to comment
Share on other sites

taz,

 

Yes that works. BUT lets say I have www.facciolli.com. And two subs off that, Dolphins and AA. The "pics" in Dolphins I do not want to be hot/remote linkable BUT the ones in the AA sub I do. I believe it is an "all" or nothing with Cpanel. Have checked around and it appears there is some "code" I can drop that will restrict it here:

 

http://www.htmlbasix.com/disablehotlinking.shtml

 

But Im a little leary of using "code generators".

Link to comment
Share on other sites

You can do what cPanel does, on a directory basis, but you'll have to do it manually.

 

For any directory tree you want protected, create in the topmost directory of that directory tree, a .htaccess file, edit it, and put something like the following in it:

 

>RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://******/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://******$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.******/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.******$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://******/invalidlink.html [R,NC]

 

All of the RewriteCond lines would need to be changed/added as needed to accomodate any valid domain URL's that are used to access your site.

 

The RewriteRule contains the extensions to protect, and the URL to redirect someone who's trying to hotlink or directly access one of the protected files. Again, change as needed.

 

Btw, if you don't want a redirected URL, you can change the RewriteRule to something like this:

>RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

 

These above examples are exactly how cPanel writes it, for what it's worth.

 

... I just looked at your link now, and yes, it looks like that will do what you need as well. It should generate something like that above.

Edited by Big Gorilla
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...