Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

The Google web crawler has indexed a whole set of URLs with encoded slashes (%2F) for our site. I assume it has picked up the pages from our XML sitemap file. The problem is that the live pages will actually result in a failure because of the Url Encoded Slashes Problem in Apache.

Some solutions are mentioned here

We are implementing a 301 redirect scheme for all the error pages. This should make the Google bot delete the pages from the crawling errors (no more crashing pages). Does implementing the 301s require the pages to be "live"? In that case we may be forced to implement solution 1 in the article.

The problem is that solution 1 will pose a security vulnerability..

share|improve this question

1 Answer 1

I would add a 404 handler to your site that is powered by a script. This is sometimes called a "smart 404 hander". In this script you could examine the url. If it has %2f encoded slashes in it, you could unencode them and issue a 301 redirect to the url that does not have them. Here is an example of such a script written in PHP

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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