Help - Search - Members - Calendar
Full Version: Hotlink prevention but allow certain directories?
Hostony Board > General Support > General Support
anticybr
I have hotlinking prevention set up for my site(s), but I want to know if it is possible to allow a specific directory and/or file to be hotlinked while all others of the same type are forbidden?

The reason is this: I run a website with a large number of gif/jpeg images that I do not want hotlinked to. I've got that all set up fine (supposedly).

However, I also have gif/jpeg banners that other sites can use that I do not mind being hotlinked. I want them to be able to just cut and paste the code I've provided so that they can easily be added to their sites. Right now, because hotlinking prevention is blocking all jpegs and gifs from being linked, it's also blocking my banners from being shown.

Cpanel has no option to allow/disallow specific directories or files like I want.

Is it possible to edit an .htaccess file to allow a specific directory (in this case, my /banners directory) to be hotlinked from while the others are still protected?

If so, can I see an example of how this might be done?
Alexandre
Yes it possible, but you need to configure it mannually via .htaccess file.
I hope the following link will help you:
http://httpd.apache.org/docs-2.1/howto/htaccess.html
anticybr
Thanks. It actually looks like I need to do something with mod_rewrite and the RewriteCond parameters...

http://httpd.apache.org/docs/mod/mod_rewrite.html
Vanya
yes, you can do this using .htaccess files in your webspace
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here