Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Direct image access redirect, possible ?

         

Sgt_Kickaxe

6:16 am on Apr 28, 2011 (gmt 0)



This isn't a hotlinking or image display on other sites question.What If an href link leads directly to a url ending in .jpg I'd like a visitor to be redirected, to the home page for example.

I'm finding that a lot of my images have incoming links directly to the image and not to the page that has the image on it, thus the page url in the address bar ends in .jpg.

I'd like visitors to always land on .html for example, or always on my homepage if they access the image directly.

Concerns: breaking my own site when it makes image requests. Can it be done? Should it be done?

TheMadScientist

3:08 am on Apr 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for the code examples Mad, i'm still trying to test it and get real logs to see what(if any) the impact on server is.

Np ... It's fun to try and solve a challenge like this and not have to code it and test and adjust it all myself once in a while ... Please let us know what you see as far as server load, because I'd definitely be interested in knowing in case I ever need to use something like it! lol

lucy24

6:26 am on Apr 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I respect that you want to bookmark my image but you're passing pagerank to a .jpg url instead of to the page it's on and I'd REALLY appreciate it if you simply linked to the page it's on instead.

Heh heh, I didn't mean images from your own page. In any case it's a non-issue because-- I just re-checked my most-used bookmark to make sure I remembered right-- the image is free-standing. That is, it's linked from a page, via <a href>, but it isn't itself on a page. And the page it links from is one of those monster lists of internal links. So I honestly don't think the site owner could possibly object :)

enigma1

2:29 pm on Apr 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So if you allow blank referrers is not too bad. Didn't see where you mentioned it about the SEs before the htaccess code post. Still visitors may have problems if they view the cached pages on SEs as they would likely carry a different SE referrer and that needs to go as a condition in .htaccess.

To continue on it now, you allow blank referrers hotlinkers may able to clear the referrers using meta refreshes and/or they can check if the referrer is blank before doing the hotlinking - if they want to go that far.

I have used the referrer hotilinking method few years ago but it brought in the opposite results of what I was hoping to get. Although it did force the hotlickers to remove images, it also forced several forums where people asking questions about the products the site carried to restrict images via html posted. The end result, was pretty much less visitors and less sales of the site. So I replaced hotilinking with watermarking, I may spend more b/w now but I get more exposure because of the hotlinking. But that's based on what each one of us carries I guess.
This 33 message thread spans 2 pages: 33