Hi guys,
Just a quick question, I'm sure it's easy.
Currently the image page is being renamed by mod_rewrite to end in the .jpg extension. I'd like it to be rewritten to a different one (like .html or .php) so that Google sees it as a page instead of an image (in other words so that it sees it correctly), how would I do that?
Thanks
Surely it would be easy to do? The problem is that search engines - rightly - don't see .jpg extensions as pages, so when the rewrite rule calls a page .jpg instead of .php, which is what it was originally of course, it isolates all image pages. By image pages I don't mean the full sized images, I mean the page generated by image.php.
Is this at all relevant?
http://www.google.com/support/webmasters/bin/answer.py?answer=34431
Could be, but I think SubJunk is right, they probably won't even consider .jpg url's as pages at all. We should have some way to put something after the .jpg, like .html or .php or .anythingyouwant. :-)
Would that work SubJunk? And no payment required, I don't take bribes ;-) I'll do it for the project because I think it's necessary and useful. If you feel you want to donate, feel free to do so at any time using the link on the front page. :-)
Checked into SVN, http://www.zenphoto.org/trac/changeset/365
It'll be in 1.0.8 in a week or less, before then you're welcome to use SVN code, it's fairly stable right now.
Here's the new config entry:
`// If mod_rewrite is true above, zenphoto's image page URL's usually end in .jpg,
// set this if you want something else appended to the end (helps search engines).
// Examples: .html, .php, /view, etc.
// Note that you shouldn't name albums with this suffix on the end.
$conf['mod_rewrite_image_suffix'] = '';`
There's an SVN test gallery up here with some cool sub-albums and this new image-page-url suffix feature, check it out:
http://www.trisweb.com/tests/zenphoto-svn/
http://www.trisweb.com/tests/zenphoto-svn/January-at-Home/Roses/
http://www.trisweb.com/tests/zenphoto-svn/January-at-Home/P1070087.JPG.html
http://www.trisweb.com/tests/zenphoto-svn/Random/Yosemite/yosemite_03XL.jpg.html
This new version is super stable and fast, I'm liking it a lot.
Oh, also, the way I did the path suffix, it's "backwards-compatible" with any previous links to the image page. So both of these work, even though the latter is now used in the gallery links.
http://www.trisweb.com/tests/zenphoto-svn/Random/Yosemite/yosemite_03XL.jpg
http://www.trisweb.com/tests/zenphoto-svn/Random/Yosemite/yosemite_03XL.jpg.html
So all of you with large galleries and lots of links to them need not worry if you want to add a suffix, just do it! It's good for search engines :-)
Cool! Thanks. How does this SVN thing work? Do I copy the code from http://www.zenphoto.org/trac/changeset/365 into the 1.0.7 code? Are the numbers on the left the line numbers?