PDA

View Full Version : Hotlink Modification Question


dwdallam.com
11-19-2006, 02:36 AM
I've enabled hotlink protection for my main site and addon domains. I would, however, like to have ONE directory where I can put images that can be hotlinked by any referer. How can I do this?

Thanks

E.M.P.
11-19-2006, 07:11 AM
I do no think that can be done.. When you enter a site url to allow hotlinked graphics it gives it the okay for your entire site. I could be wrong on this one and can be corrected.

It is almost better to run a Photobucket account and have your images hotlinked from there but that is up to you.

dwdallam.com
11-20-2006, 01:42 AM
I know you can do it in the main site's .htaccess file because the hotlink protection is simply an htaccess file parameter. I'm hoping someone can show me the line so I can modify it for use in that respect.

shadmego
11-20-2006, 06:49 AM
Have you tried running a search for "hotlink protection .htaccess"?

this looks like a great place to start your search:

http://altlab.com/htaccess_tutorial.html

classifiedsecrets
11-20-2006, 09:34 AM
Why don't you post the hotlinking code only in those directories that have images? You could remove the code from your root .htaccess file and place it in a .htaccess file in your graphics directory. Then any other directory could have graphcs that you could hotlink to.

dwdallam.com
11-21-2006, 02:43 AM
Why don't you post the hotlinking code only in those directories that have images? You could remove the code from your root .htaccess file and place it in a .htaccess file in your graphics directory. Then any other directory could have graphcs that you could hotlink to.

Hey that's a great idea. If I remove it from the root, will it get reinstalled automatically again? If so, I could just disable hotliking, and then just use the code in my directories I want protected? That would be easy.

dwdallam.com
11-21-2006, 02:58 AM
Have you tried running a search for "hotlink protection .htaccess"?

this looks like a great place to start your search:

http://altlab.com/htaccess_tutorial.html


Great. I'm reading this now. Thanks much.

dwdallam.com
11-21-2006, 03:05 AM
I was thinking what would be even easier is to palce an htaccess file in the directory I want to allow hotlinking from. This would be a better option becsaue I only want to remove hotlink protection from one directory. Thus, I could leave the root htaccess file, and override with an htaccess file in the directory I want unprotected.

Unless I'm on crack, this worked:

Options All Indexes
IndexOptions -FancyIndexing

RewriteEngine off

I put that htaccess file in the directory I wanted unprotected, and I could hotlink to it from another server, which is not in the allowed list. I don't know if I need the Rewrite line there however.