.htaccess hotlink protection
![]() |
Lycan 1 years, 6 months ago I need some sort of .htaccess rule which will do the following: I have a bunch of images in a folder that are hotlinked on other servers. I want to delete all these images and redirect all these 404's so that instead of the hotlinkers getting a nice red X they`ll get a new image I`ll upload to my server. I know there is a way to do it but I don`t know how. Anyone?
|
![]() |
MrPhear 1 years, 6 months ago Not sure how much / what sort of traffic you have on that domain, but that could be a waste of valuable non-image 404 traffic. The following code will redirect image "404s" to a default image, normal "document" 404s will be treated "normally".
RewriteEngine on RewriteCond %{REQUEST_URI} !-U RewriteRule \.(gif|jpg|jpeg)$ /your_path_to/new.gif [L] # the following is for normal 404s ErrorDocument 404 http://www.your404.com |
![]() |
Guest
|
