Title: Basic .htaccess?
Last modified: August 30, 2016

---

# Basic .htaccess?

 *  [runamuck](https://wordpress.org/support/users/runamuck/)
 * (@runamuck)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/basic-htaccess/)
 * Hi – I was taking a look at .htaccess and found this:
 *     ```
       # 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
       # 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
   
       # BEGIN wtwp_cache
       # END wtwp_cache
   
       # BEGIN wtwp_security
       # END wtwp_security
       ```
   
 * I thought the duplicate code did not look right. I also checked out codex’s page
   on this: [https://codex.wordpress.org/htaccess](https://codex.wordpress.org/htaccess),
   as well as a couple of posts.
 * It is unclear whether or not I can just delete one block of the duplicated code
   from this file and just save. Should I delete one block and save and not screw
   up anything? Please advise…TIA.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/basic-htaccess/#post-6508216)
 * You are correct about the duplication being unnecessary, and you can also delete
   those others with nothing in them. The ‘#’ is a comment mark and anything following
   it on the same line is not any kind of active code.
 * Out-of-the-box WordPress needs to be “hardened” for security, and you will learn
   a lot about htaccess by using and studying how BulletProof Security (plugin) 
   does things.
 *  Thread Starter [runamuck](https://wordpress.org/support/users/runamuck/)
 * (@runamuck)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/basic-htaccess/#post-6508248)
 * So can I delete the extraneous code and save the file without doing any harm?
 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/basic-htaccess/#post-6508249)
 * That question covers too much ground for me…
 * > ex·tra·ne·ous
   >  adjective: extraneous
   > irrelevant or unrelated to the subject at hand
   > of external origin.
   > separate from the object to which it is attached
 * 😉
 * You can actually empty htaccess altogether and then go to Dashboard > Settings
   > Permalinks where a re-save will trigger WordPress to write what it needs…and
   then I would assume any plugin allowed to write htaccess — I *never* allow that
   for any plugin other than BPS — would again take care of its own.
 *  Thread Starter [runamuck](https://wordpress.org/support/users/runamuck/)
 * (@runamuck)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/basic-htaccess/#post-6508283)
 * So I tried this:
    Went to settings>Permalinks and saved to Default.
 * Then I edited the .htaccess and deleted the “extra”
 *     ```
       # BEGIN WordPress
       # END WordPress
       ```
   
 * Uploaded to directory and overwrote the existing .htaccess file. Then went back
   to Settings>Permalinks and clicked on the “pretty” permalink structure.
 * I looked at the .htaccess file again and the “double” code appeared again.
 * I tempted to repeat the above process, but deleting .htaccess after saving to
   default permalinks.
 * Would that screw up the website?
 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/basic-htaccess/#post-6508288)
 * I know a little about htaccess but I know nothing about how permalinks work and
   I have only ever saved what I actually want at Settings > General > Permalinks.
   So, your overall questions are beyond me. In any case, the redundant code does
   not hurt anything…but maybe someone else knows why that is happening.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Basic .htaccess?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/basic-htaccess/#post-6508288)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
