Error 404 in GWM tool - album deleted Error 404 in GWM tool - album deleted
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Error 404 in GWM tool - album deleted

Started by normand, March 19, 2013, 01:50:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

normand

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

Αndré

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.

normand

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

Αndré

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.

normand

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