Member
Member
SubJunk   2007-01-18, 21:51
#1

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

Member
Member
SubJunk   2007-01-19, 22:06
#2

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.

Member
Member
DarrellD   2007-01-19, 23:45
#3

Well, I tried to play with it this morning (although I have no experience with mod_rewrite) but I couldn't figure it out. Just be patient, someone on here who knows might be able to help you out.

Member
Member
SubJunk   2007-01-20, 01:03
#4

Okay cool, thanks for trying anyway GameDudeX

Member
Member
SubJunk   2007-02-11, 21:55
#5

Just bumping this, can someone please try? I would be so grateful!

Member
Member
SubJunk   2007-02-13, 03:58
#6

I can pay someone to do it? Is there anyone here who can do it if I pay them, or do you know of anyone you can refer me to?

Developer
Developer
trisweb   2007-02-13, 05:19
#7

Wow, I never thought of that problem with search engines... I'll look into generalizing the URL output so you can change it to whatever you want.

Member
Member
SubJunk   2007-02-13, 11:10
#8

That would be great, thanks ASAP would be good, you can email or message me with what you expect as payment. I really appreciate it.

Member
Member
jayray999   2007-02-13, 18:11
#9

Is this at all relevant?

http://www.google.com/support/webmasters/bin/answer.py?answer=34431

Developer
Developer
trisweb   2007-02-13, 20:42
#10

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. :-)

Member
Member
SubJunk   2007-02-13, 22:40
#11

That's perfect. I think Google will recognize "page.jpg.html". You're a humble man!

Member
Member
SubJunk   2007-02-16, 00:23
#12

Don't mean to be pushy, but do you have any estimation of when it will be done?

Developer
Developer
trisweb   2007-02-16, 03:40
#13

Don't mean to be pushy, but no, I do not. :-)

Developer
Developer
trisweb   2007-02-16, 04:55
#14

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'] = '';`

Developer
Developer
trisweb   2007-02-16, 10:10
#15

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 :-)

Member
Member
SubJunk   2007-02-16, 10:56
#16

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?

Member
Member
SubJunk   2007-02-16, 11:07
#17

That was a stupid question, figured it out

Developer
Developer
trisweb   2007-02-16, 19:38
#18

SVN is a package deal, you have to get the whole thing with an SVN client like this:

svn export http://www.zenphoto.org/svn/trunk zenphoto

Member
Member
SubJunk   2007-02-16, 22:41
#19

Oh okay, well I just downloaded the zip of the 3 files on that page and replaced them with the existing ones and the .jpg.html thing works. Thanks

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.