Hey folks, wondering if I can get some help with this problem.
I want to have certain pics show their thumbnailed equivalent when called from a website other than my own, how would I go about doing this? I don't want to blanked redirect to just one pic, I'd like it to go to the same pic but one level down in the thumbs dir.
I was thinking something like this would work, but doesn't:
The pictures would be in:
http://mysite.com/files/1/pic.jpg
http://mysite.com/files/1/thumbs/pic.jpg
I'd like to only do this for jpg, jpeg, png, and gif files.
Any pointers would be great, I just can't seem to get my head around how to do it. Thanks in advance.
I want to have certain pics show their thumbnailed equivalent when called from a website other than my own, how would I go about doing this? I don't want to blanked redirect to just one pic, I'd like it to go to the same pic but one level down in the thumbs dir.
I was thinking something like this would work, but doesn't:
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://sitetoshowthumbs.com/$ [NC]
RewriteCond %{REQUEST_URI} ^/([0-9]+)/
RewriteRule ^/(.*)$ http://mysite.com/files/%1/thumbs/$1 [L]
http://mysite.com/files/1/pic.jpg
http://mysite.com/files/1/thumbs/pic.jpg
I'd like to only do this for jpg, jpeg, png, and gif files.
Any pointers would be great, I just can't seem to get my head around how to do it. Thanks in advance.

Comment