Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Error 404 in GWM tool - album deleted  (Read 2460 times)

0 Members and 1 Guest are viewing this topic.

normand

  • Coppermine newbie
  • Country: ca
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • Nos sites web de voyage
Error 404 in GWM tool - album deleted
« on: March 19, 2013, 01:50:08 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Error 404 in GWM tool - album deleted
« Reply #1 on: March 19, 2013, 05:12:09 pm »

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.
Logged

normand

  • Coppermine newbie
  • Country: ca
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • Nos sites web de voyage
Re: Error 404 in GWM tool - album deleted
« Reply #2 on: March 19, 2013, 05:59:39 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Error 404 in GWM tool - album deleted
« Reply #3 on: March 19, 2013, 07:50:58 pm »

Try something like
Code: [Select]
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
Code: [Select]
$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.
Logged

normand

  • Coppermine newbie
  • Country: ca
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • Nos sites web de voyage
Re: Error 404 in GWM tool - album deleted
« Reply #4 on: March 20, 2013, 02:02:58 pm »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.