Title: WordPress in a directory, redirection problem
Last modified: August 20, 2016

---

# WordPress in a directory, redirection problem

 *  [valprovost](https://wordpress.org/support/users/valprovost/)
 * (@valprovost)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/wordpress-in-a-directory-redirection-problem/)
 * My WordPress is installed in a subdirectory, so I have [http://www.mywebsite.com/mydirectory](http://www.mywebsite.com/mydirectory).
   Everything works find, I change the index.php, the line in the settings, etc.
   and my website is now viewable at [http://www.mywebsite.com](http://www.mywebsite.com).
   My problem is that when I type [http://www.mywebsite.com/wp-admin](http://www.mywebsite.com/wp-admin),
   I’m redirected to [http://www.mywebsite.com/mydirectory/wp-admin&#8230](http://www.mywebsite.com/mydirectory/wp-admin&#8230);
   and it’s stupid because that’s why I installed my WordPress in a directory –‘
 * I’m 90% sure it’s the .htaccess, so here is the code:
 *     ```
       # 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
       ```
   

The topic ‘WordPress in a directory, redirection problem’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [valprovost](https://wordpress.org/support/users/valprovost/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/wordpress-in-a-directory-redirection-problem/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
