Search code examples
wordpresspermalinks

Wordpress stop post redirects


I'm having a Wordpress problem regarding permalinks.

When I have a post whose permalink is say, /2009/10/podcasts, trying to access /podcasts redirects to /2009/10/podcasts. Is there any way to stop this behavior so I can handle it as a 404?

I'm using a custom 404 handler that checks if the request is a 404 error and executes a Kohana request from within Wordpress.


Solution

  • I just got the answer on the WP forums. It's

    remove_filter('template_redirect', 'redirect_canonical');