WordPress .htaccess subdirectory problem

Even though static files and directories do work with a mod_rewrite’d wordpress installation in the servers root you might need to exclude your CodeIgniter subdirectory from that mod_rewrite lineup.

You can do so by placing an additional .htaccess file into the CodeIgniter directory and disable mod_rewrite in there:

<IfModule mod_rewrite.c> 
RewriteEngine off
</IfModule>

Related: apache – Disable mod_rewrite for subdirectory

This normally does the job for me. But it can be less trivial in case that subdirectory needs a mod_rewrite configuration on it’s own (as some PHP Frameworks need).

To understand how the apache configuration works, please see Configuration Files (Apache Manual) and AllowOverride directive (Apache Manual).

Leave a Comment