I just found my ‘.htaccess’ file has the same lines of code repeated twice as below, maybe some plugins changed it, is it incorrect? Should I remove the repeated one? Thanks!!
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
Answer
This often happens when using a plugin like WP Super Cache or W3 Total Cache that need to add things to the .htaccess file. You can safely delete the top version (the one without the BEGIN/END WordPress
lines), but having duplicate entries won’t hurt anything. It will add a tiny bit of overhead as the rules are processed, but it’s negligible on a site that isn’t getting very large amounts of traffic.
Attribution
Source : Link , Question Author : RRN , Answer Author : Gavin Anderegg