• 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)
  • Thread Starter myladeybugg

    (@myladeybugg)

    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.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    How did you do the search replace? Did you follow these directions: https://codex.www.ads-software.com/Moving_WordPress#Moving_WordPress_Multisite

    Thread Starter myladeybugg

    (@myladeybugg)

    Hey Mika,

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

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    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?

    Thread Starter myladeybugg

    (@myladeybugg)

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

    I did not add https:// 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.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

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

    Thread Starter myladeybugg

    (@myladeybugg)

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

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

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    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?

    Thread Starter myladeybugg

    (@myladeybugg)

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

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

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Okay. YES you needed to replace WITH the http.

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

    That’s what I mean.

    Thread Starter myladeybugg

    (@myladeybugg)

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

    Thread Starter myladeybugg

    (@myladeybugg)

    Still getting a redirect loop.

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

    wp-config file:

    define("WP_SITEURL","https://IP/~username/example.com");
    define("WP_HOME","https://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>
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Did you search the database for that?

    Thread Starter myladeybugg

    (@myladeybugg)

    Yes. I used the search and replace tool.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    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 https://https://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.