Member
Member
fneumeier   2015-03-26, 14:09
#1

Since Google unfortunately has a lot of ghost links in its database (i.e. links to images on my website that never existed at the location Google thinks they are) I need to do redirects which usually I’d do in the .htaccess

But it seams that Zenphoto catches all 404 errors, no matter what I try. Even if I put rewrite rules right in the beginning of the htaccess in the Zenphoto root folder, still Zenphoto catches the requests and delivers a standard 404 error page.

Is there any way I can get my rewrite rules working without Zenphoto taking over?

Example:

Google is looking for:

http://www.cruisetricks.de/bilder/ms-europa/ms-europa-kabinen-suiten/570-kabinen-ms-europa-2965

while the actual URL is:

http://www.cruisetricks.de/bilder/albums/ms-europa/ms-europa-kabinen-suiten/570-kabinen-ms-europa-2965.jpg

So a simple

RewriteRule ^bilder/((.+)([0-9]))$ /bilder/albums/$1.jpg [L]

in the Zenphoto’s htaccess should do the trick – but it doesn’t. Instead I get the Zenphoto standard 404 error page …

Thanks a lot!
Franz

Administrator
Administrator
acrylian   2015-03-26, 14:20
#2

Most rewriting is done internally actually. Maybe this recent similar topic will help you:
http://www.zenphoto.org/support/topic.php?id=1363099

http://www.cruisetricks.de/bilder/ms-europa/ms-europa-kabinen-suiten/570-kabinen-ms-europa-2965
That is indeed not a working link for Zenphoto. But why would Google index that if it doesn't exist? Do you use the sitemap plugin?

A correct link would be this:

http://www.cruisetricks.de/bilder/ms-europa/ms-europa-kabinen-suiten/570-kabinen-ms-europa-2965.jpg(.suffix like ".php" or ".html" or else)
That would be the link to a single image page you apparently don't use.

Member
Member
fneumeier   2015-03-26, 15:30
#3

It seams like it's an issue with my rewrite rules, though I can just not figure out exactly what it is ... .htaccess and regex is a nightmare if you're not a programmer ;-)

Anyway, thanks for your help!

By the way, I'm in fact intentionally using the URL

http://www.cruisetricks.de/bilder/albums/ms-europa/ms-europa-kabinen-suiten/570-kabinen-ms-europa-2965.jpg

with "albums" in the middle and the file ending .jpg - to show the full size image directly without the image page as I'm not uploading highres pictures anyway so this saves an extra click for the users and makes lightbox slideshows much easier ;-)

Google probably picked up the wrong URLs months ago when I migrated from Menalto Gallery to Zenpohoto. There had been a few incorrect rewrite rules active for a couple of hours which was obviously long enough for Google to pick up these wrong links and keeping them forever.

Administrator
Administrator
acrylian   2015-03-26, 16:07
#4

Quote:htaccess and regex is a nightmare if you're not a programmer ;-)
Yes, they are ;-)

I do understand why you use those urls (we call these simply "fullimage url" compared to the "image page url") and no problem with that at all (drawback is that they cannot be linked directly for sharing). If you migrated from Gallery that explains why Google had wrong urls since Gallery probably has a different structure.

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