I have an EE instance on a server and need to host another PHP application in a subdirectory off the htdocs directory.

How would I adjust the .htaccess to allow this application to run without going through EE?

2 Answers 2


I have EE installed in root directory and another php applications in sub directory named "domains". All other sites in Codeigniter, WP, EE are inside this directory.

I just write 1 line to tell htaccess to ignore the "domains" folder for checking the rules:

RewriteEngine On
RewriteBase /
RewriteRule ^(domains)($|/) - [L]

Let me know if you have any confusion and need the full code of htaccess


This is the standard rewrite rules for EE:

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        # Removes index.php from ExpressionEngine URLs
        RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
        RewriteCond %{REQUEST_URI} !/system/.* [NC]
        RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

        # Directs all EE web requests through the site index file
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php/$1 [L]

This line:

RewriteCond %{REQUEST_FILENAME} !-d

Means it will ignore folders from the rewrite, therefore won't add /index.php to the beginning of your URL so EE won't manage your URLs and the folder you specify (your other app) will have control and be called.

EE Documentation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.