WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I notice that if I type in http://www.example.com/pag I can land on an existing page that has a name like http://www.example.com/page_five. I don't know exactly what causes this, but I want to know if there is a way to stop it from happening.

share|improve this question
duplicate question – Milo Apr 23 '13 at 14:54

This happens in redirect_canonical().

You can disable that function with:

remove_action('template_redirect', 'redirect_canonical');

But be aware it does a lot more. Too much for my taste …
So there might be side effects.

share|improve this answer
What else does it do? I did a quick search and I couldn't find any documentation. – emersonthis Apr 23 '13 at 14:55
@Emerson I made an update to my answer and added a link to the function’s source code. It is really, really long. – toscho Apr 23 '13 at 14:58

Your Answer


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.