I'm currently transitioning a website from their existing CMS to WordPress.
I have a custom post type of 'Episodes', with a URL of myurl.com/episodes/
There is also an existing directory at myurl.com/episodes/ which needs to remain in place for historical reasons - it contains a large number of images and static HTML files which will still need to resolve.
At the moment, because the /episodes/ directory exists, WordPress won't go anywhere near it, so the pages under my custom post type don't load.
This happens because WordPress's default .htaccess has two rules, which state that any existing file or existing directory should be not be handled by WordPress:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
But these rules stops /episodes/ from being handled by WordPress at all. I want WordPress to handle /episodes/ by default, and only not do so if the file in question exists.
But having the first line on its own - i.e. pass everything to WordPress unless the file in question exists - doesn't seem to do the trick.
Is there a way I can re-write these rewrite rules so that WordPress will still handle the request if the directory exists, but not if the file exists?