0

The number of 404 errors on the server has gone up drastically in the last 45 days (from 2000 to 9000). this is after I have made no changes to my permalink structure or .htaccess. the 404 pages are pointed to the older pages on the website - 2010/11

Several of these (majority) are -

1) the external links that are embedded into the wordpress posts are resulting in a 404

ex -

2010/premiership-forecast-title-race-hots-up-gunners-prepare-for-adebayor/www.whufc.com/

the above link is generated from the page

www.example.com/2010/premiership-forecast-title-race-hots-up-gunners-prepare-for-adebayor

2) Few pages on the website were published with special characters in the url ex-

...example.com/2012/arsenal-rewind-tactical-evolution-–-from-w-m-to-4-2-3-1-part-iv/

google webmaster shows 404 on the following -

/2012/arsenal-rewind-tactical-evolution-%25E2%2580%2593-from-w-m-to-4-2-3-1-part-iv/

but the link is resolved into this by chrome and firefox -

/2012/arsenal-rewind-tactical-evolution-%E2%80%93-from-w-m-to-4-2-3-1-part-iv/

I think something is resolving the url with special characters with a different code than it used to previously, which is why the older links result in a 404.

3) Google webmaster shows 404 on this -

http://www.example.com/index.php/thmmm-exclusive-interview-%E2%80%93-carlton-chapman/

it resolves into

...abc.../index.php/abc-exclusive-interview----carlton-chapman which return a 404

it should ideally return

...abc.../2011/abc-exclusive...

The problem here is that if the url does not have special characters index.php is correctly replaced by year name, but if the url has special characters index.php does not resolve into year name.

Please help, I do not know how to fix this.

1

I am about 99% sure the reason for much of this is that someone has used relative links in the post body.

A link that looks like this:

<a href="www.whufc.com/">Some link Test</a>

Will end up looking like this:

2010/premiership-forecast-title-race-hots-up-gunners-prepare-for-adebayor/www.whufc.com/

If it shows up on this page of the site:

2010/premiership-forecast-title-race-hots-up-gunners-prepare-for-adebayor/

You need to have the http:// part.

Some of our editors have driving me nearly insane with exactly this.

As far as the url encoding, you have your % encoded. %25 is %. Look at your string-- %25E2%2580%2593-- and try to decode that: http://urldecode.org/ See what is happening? The correctly encode string should be:--%E2%80%93-- at least I think that is what you going for and you will note that that is exactly what FireFox and Chrome resolve the string to by correctly decoding the only percent-encoded characters (the %). I don't know how the encoding got the way it is.

| improve this answer | |
  • for the embedded links, I have them in thousands by now. Is there a way to solve this through .htaccess? or some other hack? – Anurag Upadhyaya Sep 16 '13 at 7:36
  • The only thing I can think of that would be effective, but very tricky to get right, would be regexing the post content and fixing the links. – s_ha_dum Sep 16 '13 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.