Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   General Business Knowledge (http://www.greenguysboard.com/board/forumdisplay.php?f=10)
-   -   Need help with hotlinking some pics (http://www.greenguysboard.com/board/showthread.php?t=15248)

neticule 2005-01-13 09:08 AM

Need help with hotlinking some pics
 
Im submitting my site to some toplists, and a few of them need a hotlinkable thumbnail from my site, i dont mind doing this at all except that i have my site set up to not allow image hotlinking.

All my thumbs are in one folder, is there any way to allow hotlinking for one folder and keep it disabled everywhere else??

please help me out, im gonna be twiddlin my thumbs until i get some help LOL!

Cleo 2005-01-13 09:11 AM

Put a htaccess file in the folder that you want to allow hotlinking from.

Put this in the htaccess file.

RewriteEngine off

neticule 2005-01-13 09:18 AM

thanks
 
thank you Cleo! much appreciated!

lassiter 2005-01-14 02:29 PM

Quote:

Originally posted by Cleo
Put a htaccess file in the folder that you want to allow hotlinking from.

Put this in the htaccess file.

RewriteEngine off

Will that really counteract a "no hotlink" .htaccess in a higher-level directory? I was told (and perhaps erroneously) that an .htaccess script would affect the directory it was placed in and each subdirectory within that directory, regardless of what the subdirectory .htaccess file said. So I took that as a given fact, and I've never really experimented to see.

chilihost 2005-01-14 08:26 PM

htaccess files protect the directory and all subdirectories unless there is another htaccess file in the subdirectory, at which point that one takes over for its directory and its subdirectories.

an easy way to do this is to add in the domains you want hotlinkability from in your main htaccess file, ie, add in this type of line:

RewriteCond %{HTTP_REFERER} !^http://www.otherdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://otherdomain.com/.*$ [NC]

that will allow www.otherdomain.com and otherdomain.com to hotlink but still stop everyone else.

cheers,
Luke

lassiter 2005-01-14 09:35 PM

Quote:

Originally posted by chilihost
htaccess files protect the directory and all subdirectories unless there is another htaccess file in the subdirectory, at which point that one takes over for its directory and its subdirectories.
Thanks for clarifying that, Luke. :)

That in fact seems like the best way to handle the "thumbnail TGP" hotlinking requirement. Just adding additional domains to the original .htaccess file sounds good, but I've found that getting listed at certain TGPs often results in getting listed in as many as a dozen more, and it's usually impossible to know how far and to what domains a given submission may eventually be linked. So just creating a special subdirectory with its own .htaccess exception rule for the one or two hotlinkable thumbs in a gallery is probably the best way to go.


All times are GMT -4. The time now is 01:54 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc