Title: redirect wp-admin to localhost
Last modified: August 21, 2016

---

# redirect wp-admin to localhost

 *  Resolved [web_line](https://wordpress.org/support/users/web_line/)
 * (@web_line)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/redirect-wp-admin-to-localhost/)
 * Hi,
 * I just run into the problem that I can’t access the **admin** pages anymore. 
   The **blog itself works fine**. No redirect problem there.
 * When I try to access the admin page with:
 * [http://www.mysite.com/wp-admin/](http://www.mysite.com/wp-admin/)
 * the URL changes to:
 * [http://localhost/?redirect_to=http%3A%2F%2Fwww.mysite.com%2Fwp-admin%2F&reauth=1](http://localhost/?redirect_to=http%3A%2F%2Fwww.mysite.com%2Fwp-admin%2F&reauth=1)
 * I checked the wp_options table – no “localhost” entry there. siteurl and home
   show the correct domain name.
 * That’s my htaccess file:
    SetEnv PHPRC /home/mysite/public_html/php.ini
 * # 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
 * I don’t remember to have changed anything between my last successful login and
   today.
 * Any hints would be great!
 * Detlef

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

 *  Thread Starter [web_line](https://wordpress.org/support/users/web_line/)
 * (@web_line)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/redirect-wp-admin-to-localhost/#post-3977434)
 * My problem was caused by my hosting service. They implemented the redirect to
   avoid the WP installation to be hacked – without notice. I fixed know and works
   fine (with a different URL for the login).
 * Detlef
 *  [isocs](https://wordpress.org/support/users/isocs/)
 * (@isocs)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/redirect-wp-admin-to-localhost/#post-3977435)
 * Hi Detlef, thank you. In the meantime I also submitted a ticket to my hosting
   provider. They have also redirected WP without giving their clients prior warning!
   
   All the best, Bruce

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

The topic ‘redirect wp-admin to localhost’ is closed to new replies.

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)
 * [wp-admin](https://wordpress.org/support/topic-tag/wp-admin/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [isocs](https://wordpress.org/support/users/isocs/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/redirect-wp-admin-to-localhost/#post-3977435)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
