I wanted to remove the index.php the shows up in the URL. I used this guide: https://ellislab.com/expressionengine/user-guide/urls/remove_index.php.html

The 'index.php' is removed but some pages are being displayed incorrectly, or maybe the wrong pages are being requested. I have also tried all the exceptions and cases in the guide as well.

Example: Before the index.php change, when requesting the page www.mywebsite.com/help/ I would get the page that was created on Expression Engine.

After the change, I would get the index file to the help directory, which listed all the files in that directory. The directory and files seem to come from the server hosting the website. Also, requests to other webpages returned 404 errors.

Basically, The 'index.php' fix removes the index.php from the URL, but makes some webpages return errors when requested.


Sure, I'm using Apache version 2.2.3 and this is the portion I added to remove the 'index.php':

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]

  • Forgot to add, using Expression Engine v2.3.1. – Beni Apr 10 '15 at 20:54
  • Could you post the relevant portion of your .htaccess file, and if you happen to know what version of Apache you're running? – jrothafer Apr 10 '15 at 21:58
  • Is there a reason you aren't escaping the periods in your index.php? In lines one and three in your code, it should be index\.php – jrothafer Apr 10 '15 at 23:36
  • 1
    If the help directory exists, you are going to get that directory. The .htaccess configures Apache to route requests to ExpressionEngine that do not exist as actual files on the server. – Derek Jones Apr 11 '15 at 0:14
  • OH yeah, duh, why the hell else would he be getting a directory index? Check and make sure that's not a legit file path, like Derek Jones mentioned. – jrothafer Apr 11 '15 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.