WordPress.org

Support

Support » Multisite » Moved to temp URL and getting redirect loop error

Moved to temp URL and getting redirect loop error

  • I am attempting to set up my site using a temp URL (IP/~username/domain) through hostgator but I am running into some issues. I gone into the database and in the wp-options table changed the home and site URL. I then went into wp-config and changed domain of current site to

    define(‘DOMAIN_CURRENT_SITE’, ‘IP/~username/domain’);.
    path to current site is left at /

    Problem is I am running into a redirect loop. I read somewhere to try resetting permalinks, but I don’t have access to the admin panel.

    I did not change all sites URL in the database, only the main one. Should I do this? Any ideas on why I am getting the redirect? I even replaced the .htaccess with a fresh one and have been on chat with hostgator for over 2 hours with no solution thus far.

    Thank you!!

Viewing 15 replies - 1 through 15 (of 16 total)
  • I used the search and replace tool to change all values in the database to IP/~username/domain and I am still getting the redirect loop. In my wp-config, if I leave the domain_current_site to my actual domain, I get redirected to my live site. As soon as I change it to IP/~username/domain, I get the redirect loop.

    How did you do the search replace? Did you follow these directions: http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite

    Hey Mika,

    I did look at that, and then used this tool: http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Okay 🙂 I have to ask since so many people don’t and, generally, that’s where things get messy.

    What did you change this (IP/~username/domain) TO? Or if I have that backwards, what was it from?

    I changed it from http://example.com/ to IP/~username/example.com

    I did not add http:// in front of IP/~username/example.com. I’m not sure if I am supposed to. This is my first time setting up a temp URL.

    If, in your search, you included http:// then in your REPLACE you absolutely must do so as well.

    When I used the search and replace tool I searched for http://example.com and replaced it with IP/~username/example.com.

    Should I of replaced with http://IP/~username/example/com? Would this cause a redirect issue?

    The forums are putting in http in the example URL. Can you use code tags around it like example.com or confirm that you DID NOT search for the URL with http?

    I did search with http, but did not replace with http.

    Search: http://example.com/
    Replaced: IP/~username/example.com

    Okay. YES you needed to replace WITH the http.

    If, in your search, you included http:// then in your REPLACE you absolutely must do so as well.

    That’s what I mean.

    Ok, I’ll run the tool again and replace with http and then update.

    Still getting a redirect loop.

    I searched: IP/~username/example.com
    replaced with: http://IP/~username/example.com

    wp-config file:

    define("WP_SITEURL","http://IP/~username/example.com");
    define("WP_HOME","http://IP/~username/example.com);
    
    define('DOMAIN_CURRENT_SITE', 'IP/~username/example.com');
    define('PATH_CURRENT_SITE', '/');

    .htaccess file:

    ###############################################################
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    RewriteBase /
    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]
    </IfModule>
    # END WordPress
    
    ##############################################################
    
    <IfModule mod_rewrite.c>
    Options -MultiViews
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !.*\.(jpeg|jpg|gif|png|ico)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /home.php [L]
    </IfModule>

    Did you search the database for that?

    Yes. I used the search and replace tool.

    Search the DB for IP/~username/example.com again, and MAKE SURE.

    Note: I am not telling you to replace, I’m telling you to LOOK. There’s a change you’ve got http://http://IP/~username/example.com going on now.

    Also flush all your cookies.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Moved to temp URL and getting redirect loop error’ is closed to new replies.
Skip to toolbar