Hotlink exceptions and .htaccess?
I used cPanel to automatically hotlink protect against my images being hotlinked on other domains. But I have some "link to me buttons" that I make available to anybody who wants to add them to their blogs and/or webpages. I know of a few people who actually use these graphic buttons so I added their domains to the hotlink exceptions list, but that's not a valid longterm solution.
I must admit now that I really have no idea what the magical .htaccess file actually does, but I was told that this is where my hotlink permissions were set via cPanel. Long story short, how do I prevent hotlinking of my images EXCEPT for the one folder I specify as okay?
Thanks.
Busy posted this at 21:19 — 7th March 2006.
He has: 6,151 posts
Joined: May 2001
place the hotlink .htaccess file in the root folder (will stop from whole domain) but in the folder you want people to link from add a .htaccess file with permissions to all or blank.
I think cpanel places a .htaccess file in every folder
timjpriebe posted this at 13:39 — 8th March 2006.
He has: 2,667 posts
Joined: Dec 2004
You might also check out this link, the .htaccess cheatsheet:
http://thejackol.com/htaccess-cheatsheet
I used it just last night on a project.
fifeclub posted this at 03:56 — 10th March 2006.
He has: 688 posts
Joined: Feb 2001
Thanks y'all. I got it working the way I needed. I like to come back and tell people how my problem was fixed, incase it may help others with the same issue.
In order to UN-hotlink a specific directory, I just created an .htaccess file in that directory with the following code:
RewriteEngine on
RewriteRule ^.*$ -
That's all.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.