Forum Moderators: phranque
i have a wordpress blog that gets a lot of visits daily from Google Images [like 1-2k/day] and most of those visits click fast on "View large size" and i can't monetize those visits. I made an image.php that will include the image, some text and ads and now i need to find a way to redirect .jpg to image.php?=image.jpg
The images are stored in multiple folders like:
http:// site.com/wp-content/uploads/2008 & 2009/01 to 12/
Anyone knows the solution for that?
[edited by: Nosfer at 10:46 pm (utc) on Jan. 31, 2009]
So, best practice would be to link "View large size" to /wp-content/uploads/2008-2009/01-12/lg-image-001234.html, and then rewrite that (using mod_rewrite) to /image.php?image=uploads/2008-2009/01-to-12/lg-image-001234.jpg or some-such. (Note that I got rid of all characters in those URLs that are required to be hex-encoded before they can be included in a URL, such as spaces and ampersands. See HTTP specification RFC2396 for more info.)
Basically, if you are going to include a "file type" in a URL, it is best if that filetype is accurate. For some background on why I recommend this, try searching for "link to page instead of image" and similar; The basic problem is that browsers can't handle HTML when they're expecting an image-format file, because a "page" usually defines a "whole new window" in a browser, while an image is usually included into the current window.
Jim
The "View large size" link is not on my site, it's on the google Images frame. For example:
[images.google.com...]
when you click on an image on the top frame it has a "view large size" link which takes the visitors to the .jpg file. I use a redirect script from top location to post location but it's too slow and still loose a lot of visitors.