Is there a default .htaccess rewrite block for EE while running it in a subfolder?

I have EE in /eefolder/ i.e., mydomain.com/eefolder/ with simply

RewriteEngine on

in the .htaccess file in that folder.

I have WordPress in root, i.e. mydomain.com with its own .htaccess file and rewrite block.

When I try to view any URL in EE, such as mydomain.com/eefolder/site , I get a 404 from either WordPress or the default 404 from the hosting service.

What do I need in .htaccess in the eefolder? Is there a default rewrite block? I have the index.php file in the eefolder.

Or is there another configuration to change to be able to view the EE site and not get a 404?

  • I run versions of EE in sub domains without issue. Can you create a sub domain? eesite.mydomain.com
    – Lloyd Hill
    Sep 7, 2013 at 10:19
  • Good idea, but the answer below works. Sep 7, 2013 at 18:31

1 Answer 1


Take the standard method and add in your subfolder name before index.php in the RewriteRule.

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /SUBFOLDER/index.php/$1 [L]

  • Thanks, this works. But now, hah, I'm stuck with "This site is currently offline" message that I can't seem to disable. Sep 7, 2013 at 18:31

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.