FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


creating .htaccess?





MMFAN
Well, I want to stop people from hotlinking my images and I found a way but it says to ger persmiision from the host so would I be allowed?
Bondings
MMFAN wrote:
Well, I want to stop people from hotlinking my images and I found a way but it says to ger persmiision from the host so would I be allowed?

Just enable the hotlink protection in cpanel, that should do it for you. I don't know what you are thinking of doing, but most likely it would be allowed.
MMFAN
heres what im doing:

Quote:

How can I prevent other sites linking directly to the pictures in my gallery instead of the gallery page?

Prevent "hotlinking" by creating a .htaccess file in the albums folder and adding this:

SetEnvIfNoCase Referer "^http://www.yourdomian.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://yourdomain.com/" locally_linked=1
SetEnvIf Referer "^$" locally_linked=1
<FilesMatch "\.(gif|png|jpe?g)$">
Order Allow,Deny
Allow from env=locally_linked
</FilesMatch>

This will only work on linux/unix and only if you're allowed to do that by your webhost or if you run your own server!
Bondings
MMFAN wrote:
heres what im doing:

Quote:

How can I prevent other sites linking directly to the pictures in my gallery instead of the gallery page?

Prevent "hotlinking" by creating a .htaccess file in the albums folder and adding this:

SetEnvIfNoCase Referer "^http://www.yourdomian.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://yourdomain.com/" locally_linked=1
SetEnvIf Referer "^$" locally_linked=1
<FilesMatch "\.(gif|png|jpe?g)$">
Order Allow,Deny
Allow from env=locally_linked
</FilesMatch>

This will only work on linux/unix and only if you're allowed to do that by your webhost or if you run your own server!

Yeah, that code is allowed unless it crashes the server, of course. Wink
Related topics
htaccess Password Protection
.htaccess tutorial
CANT UPLOAD .htaccess, .htpasswd, .header, .footer
[tutor] How to protect images without htaccess using PHP
.htaccess IP Blocking
Custom error pages using .htaccess
A Question For .htaccess
Creating a Favicon For Your Site
Help with creating a Frihost website.
Andermans Tips For Creating A New Website
How to ban someone's IP from accesing my site?
.htaccess
General .htaccess tutorial.
Two questions about the file ".htaccess"
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.