Excuse me a moment while I get my geek on.

I wanted to mention this here, so we could easily refer back to it and in case anyone else needs it.

Not very often do we have EE running in a subdirectory, but it happens, and when it does, we still need a way to remove index.php from the URLs so everything is nice and clean.

The supported index.php removal isn’t going to slice it, but this little piece of joyous code will.

RewriteEngine On

RewriteBase /

RewriteCond $1 !^(index.php) [NC]

RewriteRule ^(.*)$ /subdirecotry/index.php/$1 [L]

Pop that into your .htaccess file in the subdirectory where EE is located, and rename “subdirectory” with the name of the subdirectory you are using. Everything should be right in the world.

Happy Dev!

About the author