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!
?
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]