I recently upgraded a site to EE3 and the EE2 version of the site was using .htaccess to remove index.php from the URLs.

For example: foo.com/content/index.php/blog is instead foo.com/content/blog

After the upgrade, links that worked with index.php removed from the URLs are causing the site to redirect to the homepage, as if these pages didn't exist. Links with index.php still work and render the correct page. Here is the contents of the .htaccess file:

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

After poking and prodding the site in many ways, my hypothesis is that the .htaccess rewrite rules were OK in EE2, but EE3 needs them to change in someway.

Any guidance or advice would be sincerely appreciated!

  • 4
    Have you tried updating your rewrite rules to match those found in the EE3 docs? Jun 5, 2017 at 14:47
  • @DerekHogue I commented out the existing rewrite rules and replaced them with the EE3 recommended rules to no avail. I also edited those rules per the docs about subfolders.
    – Tim Willis
    Jun 5, 2017 at 17:44
  • 2
    some environments need a ? after index.php. Not sure if that helps you, but I've found that has been the case for many of my projects. RewriteRule ^(.*)$ /index.php?/$1 [L]
    – pixldev
    Jun 6, 2017 at 0:56

1 Answer 1


Thanks to all that attempted to answer the question. I narrowed it down to either a server side issue or .htaccess issue, but in the end it was some server side settings gone awry. This is a dev environment I didn't have backend access to so I was at the will of the client. I suppose the lesson here is make sure all your ducks are in a row, even when you don't have access to the ducks.

Your Answer

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

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