Title: Plugin breaks /login redirection when WP installed in a subfolder
Last modified: August 21, 2016

---

# Plugin breaks /login redirection when WP installed in a subfolder

 *  [GermanKiwi](https://wordpress.org/support/users/germankiwi/)
 * (@germankiwi)
 * [13 years ago](https://wordpress.org/support/topic/plugin-breaks-login-redirection-when-wp-installed-in-a-subfolder/)
 * Hi, I’ve just discovered something odd with this plugin…
 * I’ve just installed a brand new WordPress site, but with WordPress installed 
   into a subfolder while the site address points to the root directory.
 * In other words, on my General Settings page, I have the following:
 * WordPress Address = [http://www.example.com/wordpress](http://www.example.com/wordpress)
   
   Site Address = [http://www.example.com](http://www.example.com)
 * (This is a supported configuration as per [http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory](http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory))
 * Everything works perfectly fine, and the site is reachable at [http://www.example.com](http://www.example.com).
 * There are a couple of URL aliases/redirections that are built into WP core, which
   work like this:
 * [http://www.example.com/login](http://www.example.com/login) -> [http://www.example.com/wordpress/wp-login.php](http://www.example.com/wordpress/wp-login.php)
 * [http://www.example.com/admin](http://www.example.com/admin) -> [http://www.example.com/wordpress/wp-admin](http://www.example.com/wordpress/wp-admin)
 * These are described at [http://core.trac.wordpress.org/ticket/19607](http://core.trac.wordpress.org/ticket/19607)
   and they work regardless of whether WordPress is installed into the root folder
   or a subfolder. The /login and /admin aliases will always redirect to the correct
   location of wp-login.php or wp-admin respectively. And they work fine for me 
   on my new WordPress installation.
 * However, I then installed the Root Relative URLs plugin (and no other plugins
   at all).
 * Immediately afterwards, I discovered that these alias URLs no longer work! When
   I log out of WordPress and then go to [http://www.example.com/login](http://www.example.com/login)
   for example, it just gives me a 404 error instead of redirecting to [http://www.example.com/wordpress/wp-login.php](http://www.example.com/wordpress/wp-login.php)
   like it’s supposed to.
 * If I disable the Root Relative URLs plugin, then log out again and go to [http://www.example.com/login](http://www.example.com/login),
   it redirects correctly as it should.
 * So it seems this plugin is breaking the redirection somehow. But I don’t know
   how, or how to fix it.
 * Any ideas?
 * [http://wordpress.org/extend/plugins/root-relative-urls/](http://wordpress.org/extend/plugins/root-relative-urls/)

Viewing 1 replies (of 1 total)

 *  [mark_at_kaazing](https://wordpress.org/support/users/mark_at_kaazing/)
 * (@mark_at_kaazing)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-breaks-login-redirection-when-wp-installed-in-a-subfolder/#post-3783970)
 * I installed the Root Relative URLs plugin today and I had to change the example
   configuration in wp-config.php to the following:
 *     ```
       define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
       define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/wordpress');
       define('WP_CONTENT_URL', '/wordpress/wp-content');
       define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);
       ```
   
 * You’ll see that I altered the second and third line to include /wordpress

Viewing 1 replies (of 1 total)

The topic ‘Plugin breaks /login redirection when WP installed in a subfolder’ is
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/root-relative-urls.svg)
 * [Root Relative URLs](https://wordpress.org/plugins/root-relative-urls/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/root-relative-urls/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/root-relative-urls/)
 * [Active Topics](https://wordpress.org/support/plugin/root-relative-urls/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/root-relative-urls/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/root-relative-urls/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [mark_at_kaazing](https://wordpress.org/support/users/mark_at_kaazing/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-breaks-login-redirection-when-wp-installed-in-a-subfolder/#post-3783970)
 * Status: not resolved