![]() |
htaccess question
Is it possible to redirect hotlinked images to a URL? I have a site hotlinking my images. Now i could just block it to a default image of goatse or somthing, but they're hitting me about 1k times a day, so a redirect would be worth some traffic. Is there any way to do this through htaccess?
|
no you can not it will just show up as a red x
|
the best you can do is show a different image, like "Visit xyz.com"
|
Redirect to a flash file that does a popup?
Or take it down so it 404's and then change the 404 to something that does a pop? Not sure if that would work though. |
|
|
|
You can do this with a little bit of PHP scripting. Basically, you need to look up the HTTP_REFERER header sent by the client (in PHP it would be typically found in $_SERVER['HTTP_REFERER'] variable). You then normalize the URL and check it against your own domain. If the traffic is coming from outside, you do a redirect. Otherwise you let it in and serve the content
|
| All times are GMT -7. The time now is 05:53 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123