Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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. –  SDP 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
add comment

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.