I am not sure if this is the correct place to post this one.. Will you please help me to mod rewrite my site images, I want that when someone directly access the image in their browser it will redirect to a php file... but if the site it self request the images it will not redirected... Here is the example url http://cars.bayaw.com/pictures/2005FerrariEnzo1.jpg he or she will be I want that URL will be redirected to this url http://cars.bayaw.com/zoom/2005FerrariEnzo1.jpg/2005 Ferrari Enzo/ when someone directly requesting the first url from their browser or any location except the site it self. Thanks in advance...
try Options +FollowSymlinks RewriteEngine on RewriteRule ^(.+).jpg wrror.php [nc] than copy it for every file type you want but i'm not sure if this works post if not and i'll take a look
It redirecting now to the php file but the problem now is that the pictures are not showing anymore...
oh yeah lol sorry that was just the code i used for normal redirect here you go RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com(/)?.*$ [NC] RewriteRule .*\.(gif)$ /img.php [R,NC]