ciber Posted June 26, 2008 Share Posted June 26, 2008 Hi, I have a big issue with my site, what is happening is im getting close to 3000 links to my images from forums and site - problem is I want the people to be able to view it from my site but i dont want it to be viewable on the site. I tried playing around with some PHP as I wanted to get it to make the image viewable through php. My idea was to take the source url and place it into an <img src=" "> but I dont know how to do the htaccess to work so that the image url and what should be put inbetween the " " to get the link there. Does anyone know if this is possible? if so how can I do it then? Thanks Quote Link to comment Share on other sites More sharing options...
jonsjava Posted June 26, 2008 Share Posted June 26, 2008 put this in a your .htaccess file of the directory that your images reside: .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://([^.]+\.)?domain\.com/ [NC] RewriteCond %{HTTP_USER_AGENT} !(googlebot-image|msnbot|psbot|yahoo-mmcrawler) [NC] RewriteRule \.(bmp|gif|jpe?g|png)$ - [NC,F] </IfModule> Quote Link to comment Share on other sites More sharing options...
ciber Posted June 27, 2008 Author Share Posted June 27, 2008 Ive done that already, What is happening now is User visits from other site > htaccess blocks user > redirects to page saying "no access what i want it to do is, User visits from other site > user gets redirected to viewing page > image viewable I want to use it so that they get re-directed to a page where the image is viewed, so that I can at least track the hits and the image is not being viewed without the sites borders around it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.