Hi,
Recently I reorganized my Coppermine v1.5.22 to standardize with my other Coppermine albums (different servers).
By doing this action, I have generated a multitude of error 404 in my Google Webmaster Tool.
I tried to redirect deleted albums in my .htaccess file but unsuccessfully.
Do you have any clue on how to proceed in redirection ? The number of broken links keep growing.
Thanks for your help and many sorry if this subject has already been discussed (did a search but unsuccessfully).
Regards,
Normand
What are your current redirect rules? As albums usually accessed via thumbnails.php?aid=ID, there's no reason for HTTP status code 404, as that file still exists.
Please post some example messages.
Thanks André for your help.
I attached to this reply two capture screens of GWMT error 404 message.
For example, the album ...
photos/thumbnails.php?album=221
no longer exists, so I would like to correct it by redirect this particular album.
I have tried ...
RewriteRule ^album=221$ "http://www.cayolargo.net/photos/index.php?cat=7" [R=301,L]
but the redirect does not work if a « = » is present, unless I can find a way to fix this!
Thanks for your help
Try something like
RewriteEngine on
RewriteCond %{QUERY_STRING} ^.*album=221$ [NC]
RewriteRule ^thumbnails\.php$ http://www.cayolargo.net/photos/index.php?cat=7 [R=301,L]
Alternatively we could modify the Coppermine function cpg_die and redirect the user instead of displaying the error message. That's maybe easier to maintain, as we just need to create a simple array like
$redirect = array(
'221' => '7',
'old_id' => 'new_id'
...
);
and some other piece of code.
Tell me what's your preferred solution and/or if the above rule works, as I haven't tested it.
Many thanks André for your help.
I did the redirection according to your advice, and my problem is now solved.
I had to create multiple lines for every error 404.
Regards,
Normand