Fully Removing index.php From URLs
We recently updated our user guide’s article on removing index.php from URLs, and it includes a pretty important change worth noting here.
Previously, the rewrite instructions in the guide allowed
ExpressionEngine to run properly when
index.php was left out of URLs.
ExpressionEngine URLs looked like this by default:
But the rewrite instructions allowed ExpressionEngine to serve up that same page when the browser was pointed here:
Awesome, right? The problem was that the URL with
index.php in it
still worked, meaning ExpressionEngine would serve the same page for
two different URLs. That might seem pretty harmless, but duplicate
content can have a negative effect on your site’s search engine
rankings. And if some visitors are browsing your site with URLs that
index.php and some aren’t, the site’s analytics could become
much less meaningful.
The rewrite instructions now include a rule to actually remove the
index.php from URLs if it’s present. That leaves you with clean,
index.php-free URLs every time.
We strongly encourage you to update your site’s
.htaccess file with
the latest rewrite instructions.