Forum Moderators: phranque
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !mydomain.com [NC]
RewriteRule \.(gif|jpg|png|ico)$ ht tp://example2.com/istealimages.gif [L]
I added a space to "ht tp" so this forum wouldn't interpret it as a url.
If you load one of my pages in a browser, you see the images just fine, but the image url's have been silently rewritten to the optimized version. When someone hotlinks one of my images, they're using the longer, rewritten url
<html>
...
<img src=originalFilename.gif>
...
</html>
<html>
...
<img src=originalFileName.gif.pagespeed.ce.9-w9vHbyfP.gif>
...
</html>
I wondered whether they're getting the "real" originalFileName.gif.pagespeed.ce.9-w9vHbyfP.gif or a rewritten version.
I do see both rewrites and redirects in my log files, as 301's and 302's respectively.
Well, it's easy enough to see what the requesting page is getting. In my browser, I just control-click on the image and choose "Copy image url"
Uh.... No. What you've got there is a permanent redirect (301) as opposed to a temporary redirect (302). Rewrites don't appear in logs.