Title: htaccess causing link error?
Last modified: August 19, 2016

---

# htaccess causing link error?

 *  [buxombeauty](https://wordpress.org/support/users/buxombeauty/)
 * (@buxombeauty)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/htaccess-causing-link-error/)
 * I think my htaccess is causing a link error with my blog pages. I have wordpress
   setup on my root directory, and I have 2 additional directories with their own
   htaccess for password protection.
 * Something happened with my site causing all the wordpress links not to work. 
   I was advised to update my permalinks, which I did WITHOUT changing, only hitting
   the save button from the admin panel. That fixed the wordpress link errors…
 * but
 * It caused 404 errors at my other 2 directories. I’m on dreamhost and they aren’t
   helpful – they only say I need to edit my htaccess file.
 * I’ve searched and found info on how to fix the 404 problem, but then that causes
   wordpress link errors again!
 * I keep going in circles! My site was working fine yesterday.
 * Here is my current htaccess file:
 * # BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule
   ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}!-
   d RewriteCond %{REQUEST_URI} “/slave-pit/” RewriteCond %{REQUEST_URI} “/downloads/”
   RewriteRule . /index.php [L] </IfModule> # END WordPress
 * With this version my other 2 directories work fine, but not my wordpress links.
 * With the following version, my wordpress links work, but not my other 2 directories!
 * # BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond%{
   REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI}“/
   slave-pit/” RewriteCond %{REQUEST_URI} “/downloads/” RewriteRule . /index.php[
   L] </IfModule> # END WordPress
 * What am I doing wrong??
 * TIA

Viewing 1 replies (of 1 total)

 *  [Agus Suhanto](https://wordpress.org/support/users/suhanto/)
 * (@suhanto)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/htaccess-causing-link-error/#post-1638823)
 * If you access physicall files inside /slave-pit/ and /downloads/ directory, standard
   WordPress generated .htaccess file should work fine. Except if you also doing
   rewrite on those two directories, you should have .htaccess in each directory
   to handle rewrite for that particular directory.
 * Rewrite rule works outward. I mean if the most inner directory has .htaccess,
   the web server will process it, then process .htaccess on parent directory.
 * So, the solution for your problem is to have .htaccess in each directory to perform
   rewriting in each particular directory, unless you only access physical files
   in those directories.

Viewing 1 replies (of 1 total)

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

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Agus Suhanto](https://wordpress.org/support/users/suhanto/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/htaccess-causing-link-error/#post-1638823)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
