Tag: Linux
-
Block hotlinkers but allow some sites remote access to images using .htaccess
In a previous post I explained how to create a .htaccess file to stop remote image linking (hotlinking) and bandwidth theft – however, there are some situations where you might want your image files linked to from remote sites – how do you make exceptions for these sites? The code to block all sites from…
-
Using .htaccess to redirect hotlinkers to another image
In my last post on using .htaccess to block direct linking of images, I advised simply using the RewriteRule to forbid display of images (i.e. RewriteRule .(gif|png|jpg|jpeg?)$ – [NC,F]). This is a nice simple rule which works a treat to block display of your images on remote sites. However, if you want to take this…
-
Using .htaccess to stop remote image linking (hotlinking) and bandwidth theft
Hotlinking, remote image linking, direct image linking is when a remote website embeds images from your site on their webpage(s) – this causes the image to be served from your website to anyone browsing their site – thus they are robbing your bandwidth. How can you stop this? Well, using an .htaccess file in your…
-
How to create an .htaccess file
The .htaccess file is a very powerful tool – amongst other things, it allows you to password protect folders, redirect users automatically, use custom error pages, change your file extensions, ban users by IP address, only allow users with certain IP addresses, stop directory listings and use an alternate index file. Creating the file is…