Title: .htaccess error
Last modified: August 19, 2016

---

# .htaccess error

 *  [shounakgupte](https://wordpress.org/support/users/shounakgupte/)
 * (@shounakgupte)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/htaccess-error-1/)
 * Hi. I installed by blog on my site a few months back and now i am trying to password
   protect some of my other directories of the site with .htaccess. During installation,
   wordpress wrote the following lines in my .htaccess file
 *     ```
       RewriteEngine On
       RewriteBase /blog/
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /blog/index.php [L]
       ```
   
 * The password protect doesnt work if these lines are there in the file. If I remove
   these files, the password protect does work but none of my pages on the blog 
   open.
 * Does anyone have a workaround this problem? Any help is highly appritiated!!

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/htaccess-error-1/#post-1332990)
 * There shouldn’t be any clash here. If you want to password protect directory `
   foo`, you need to place a new .htaccess file in the `foo` directory. You don’t
   change the WP or root .htaccess file.
 *  Thread Starter [shounakgupte](https://wordpress.org/support/users/shounakgupte/)
 * (@shounakgupte)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/htaccess-error-1/#post-1332993)
 * i am doing the password protection through my hosting company using cpanel. not
   sure where it places the new file.
 * can i check it using ftp?
 *  Thread Starter [shounakgupte](https://wordpress.org/support/users/shounakgupte/)
 * (@shounakgupte)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/htaccess-error-1/#post-1332996)
 * hi esmi. the new .htaccess files are under the respective directories.
 *  Thread Starter [shounakgupte](https://wordpress.org/support/users/shounakgupte/)
 * (@shounakgupte)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/htaccess-error-1/#post-1333159)
 * any help?
 *  Thread Starter [shounakgupte](https://wordpress.org/support/users/shounakgupte/)
 * (@shounakgupte)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/htaccess-error-1/#post-1333219)
 * any solutions?

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

The topic ‘.htaccess error’ is closed to new replies.

## Tags

 * [htaccess error](https://wordpress.org/support/topic-tag/htaccess-error/)

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

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
