WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Authentication Redirect Loop Redux... (12 posts)

  1. Smittie
    Member
    Posted 1 year ago #

    I am trying to migrate from a single use install of WordPress to multisite. I have followed the instructions provided here. When I had completed the instructions to the point where you log out and log back in and tried to log back in, I was in a redirect loop. I found this forum thread and did everything mentioned there. I still have a redirect loop.

    Site details

    WordPress is installed at ~/htmlHome/wordpress/
    Blog is installed at ~/htmlHome/blog/

    The hosting service is Bluehost.com.

    My .htaccess file for multisite:

    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Clearly I've missed something but I cannot figure out what it is. I'd be most grateful for some guidance.

    -- Smittie
    blog.smittie.com

  2. derrick_w
    Member
    Posted 1 year ago #

    Please explain:
    WordPress is installed at ~/htmlHome/wordpress/
    Blog is installed at ~/htmlHome/blog/

    In general, the login loop is due to WordPress being asked to work with a URL it can't understand, analogous to HTTP error 404.

    Disable your .htaccess, I do this by renaming it.
    Then attempt login by manually entering the 'real' URL
    ie. http://domain.tld/any/other/subfolders/your-wordpress-install-dir/wp-login.php

  3. Smittie
    Member
    Posted 1 year ago #

    Hello derrick_w. Thanks for responding. I was developing a complex.

    So, WP is installed at ~/htmlHome/wordpress/ the URL of which is http://mydomain.com/wordpress/. The one and only blog currently running on this install of WP is at ~/htmlHome/blog/, the URL of which is http://mydomain.com/blog/.

    Everything works as advertised when using non-multisite .htaccess and wp-config.php files. When using the multisite .htaccess and wp-config.php files, everything except the login page work as they should. The blog loads normally. It is only the login page that has problems. Once multisite is turned on, any attempt to access http://mydomain.com/wordpress/wp-admin/ results in a redirect loop.

    -- Smittie

  4. derrick_w
    Member
    Posted 1 year ago #

    Yes, a phone call would cut down on 'complex.' Tell me if we are not working with 3.5.1. My understanding of WP Network, leads me to believe a standard/default/vanilla setup of your single WP site (blog some call it), helps facilitate later enabling and setting up a Network. Most folks 1st site (blog) runs where WP is installed. Installed meaning where the wp-(admin|content|includes) folders exist. URLs to the site (blog) would depend on where WP's index.php resides. For example: http://domain.tld or http://domain.tld/wordpress

    Pardon, but I still don't get
    WordPress is installed at ~/htmlHome/wordpress/
    Blog is installed at ~/htmlHome/blog/
    structure. What files/folders exist in home/blog?
    The 2 URLs you mentioned earlier, without any mention of redirection or forwarding, look like you have 2 installs of WP. Or, are you using 2 or more copies of WP's index.php to get from home/blog to home/wordpress?

    Besides racking my brain, I was waiting for you to respond with results to my earlier suggestion to disable your .htaccess, but I think we need to clear up the schizophrenic blog first.

  5. Smittie
    Member
    Posted 1 year ago #

    One install of WP set up to work from its own directory. The blog directory only contains an index.php file and a .htaccess file. The WordPress directory contains the normal WordPress files.

    -- Smittie

  6. derrick_w
    Member
    Posted 1 year ago #

    Any need to maintain http://mydomain.com/blog/ URL going forward?
    Is this URL used for anything right now, other than 'running' WP in home/wordpress?

    And now let's focus on http://mydomain.com/wordpress/

    What's the target, subfolder or subdomain Network?

    Disable your /htmlHome/.htaccess, I do mine by renaming it.
    Then attempt login by manually requesting the 'real' URL
    ie. http://domain.tld/wordpress/wp-login.php

  7. Smittie
    Member
    Posted 1 year ago #

    http://mydomain.com/blog/ is where the blog resides. It will continue to reside there. I'm transitioning to multisite because I want to support a couple more blogs off the same install of wordpress.

    It is set up as a subfolder network and SUBDOMAIN_INSTALL is defined as false in the wp-config.

    If there is no .htaccess or if the .htaccess is step up for single use, there is no redirect loop. The redirect loop only occurs when multisite is set up.

    -- Smittie

  8. Smittie
    Member
    Posted 1 year ago #

    These instructions explain setting up WordPress to run from its own directory:

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

  9. derrick_w
    Member
    Posted 1 year ago #

    The reason I asked, "Any need to maintain http://mydomain.com/blog/ URL going forward?" is I believe you can drop the /blog/ part of the URL for your main site, and then subsequent blogs with URLs like ..com/subfolder1, ..com/subfolder2, ... your call.

    Login go to the Network Admin Dashboard -> Settings -> Network Setup. WP should offer you the .htaccess code it recommends. Is it any different than what you posted above?

  10. Smittie
    Member
    Posted 1 year ago #

    I gave up. Deleted everything. Going to start over with a clean install and rebuild from there.

    Thank you for your time.

    -- Smittie

  11. derrick_w
    Member
    Posted 1 year ago #

    Sorry to hear that. Everyone has a different limit. You referred to Giving WordPress Its Own Directory. My take away from that is the following:
    - install WP into a subfolder of the document root of your domain.tld
    /blog/ for example
    - if you want to 'run' the main WP site from the root, ie. url http://domain.tld vs. http://domain.tld/blog/, copy domain.tld/blog/index.php to domain.tld/index.php
    - WP permalinks or network setup will give you the .htaccess or web.config code. These files go with index.php you are using to 'run' WP.

    The installation mentioned in above posts was complicated by electing to use two folders /wordpress and /blog at the same level, whereas a single folder, /blog/, would have satisfied Smittie's requirements. We could have even used the /wordpress/ folder with the url http://domain.tld/blog/. But that is for a redirection topic.

  12. Smittie
    Member
    Posted 1 year ago #

    I'm looking to support more than one site out of the /wordpress install, hence the desire to get multisite up and running. I currently only run one blog from the WordPress install but I need to add two more. I will eventually get it working but I wanted to start with a clean install so that I am not trying to solve pre-existing problems while at the same time figuring out new functionality. Based on the explanations codex.wordpress.org, WordPress will work in multisite mode from its own directory without adding my own alterations. I am looking to understand that implementation first. Once I understand that, I can start to add layers of complication.

    -- Smittie

Topic Closed

This topic has been closed to new replies.

About this Topic