Don’t Show “index.php” in the URL (WordPress)
This is a .htaccess rule to use to make sure that “index.php” doesn’t show up in URLs (for SEO reasons). You want to do this so that you have just one URL pointing to a page instead of two URLs (one with index.php and one without) so that your website doesn’t have 2 pages with the same content. You may get a duplicate content penalty by Google if you don’t do this.
Here’s that one:
Options +FollowSymLinks
DirectoryIndex index.php
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/
RewriteRule ^index.php$ https://www.yourdomain.com/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]📄 Download a PDF of This Article
