Hi all,
I'm new to .htaccess and I'm trying to redirect all image hotlinking to a page on my site. I also need to pass the requested image to the page as a parameter. I can't seem to get it to work, can someone point me in the right direction?
[tt]
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^ [NC]
RewriteRule .*\.(jpg|jpeg)$ [R,NC]
[/tt]
So if someone hotlinks to [tt][/tt] I want them to pull down [tt][/tt] instead (this PHP file produces an image in the JPEG MIME type).
What do you all think? I know I can use mod_rewrite, btw. Thanks!
I'm new to .htaccess and I'm trying to redirect all image hotlinking to a page on my site. I also need to pass the requested image to the page as a parameter. I can't seem to get it to work, can someone point me in the right direction?
[tt]
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^ [NC]
RewriteRule .*\.(jpg|jpeg)$ [R,NC]
[/tt]
So if someone hotlinks to [tt][/tt] I want them to pull down [tt][/tt] instead (this PHP file produces an image in the JPEG MIME type).
What do you all think? I know I can use mod_rewrite, btw. Thanks!