I inherited a site that was not configured with url rewriting, leaving the index.php as a part of all the site's urls. I plan to implement this, but we also have over a year's worth of posts spread across at least three different social media. I'm guessing that I need to configure some sort of redirect to make sure that the old links map to the new links, is that right? Is this something I have to do in an .htaccess file, or is there a module for this. Thanks in advance.

1 Answer 1


Once URL Rewriting is enabled, links including index.php will still work.

To help preserve search engine rankings you can redirect the urls that include index.php to the non-index.php versions using .htaccess like this:

RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

Reference: https://stackoverflow.com/a/24008632/1983389

Your Answer

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

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