WordPress.org

Ready to get started?Download WordPress

Forums

Moved to temp URL and getting redirect loop error (17 posts)

  1. myladeybugg
    Member
    Posted 1 year ago #

    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!!

  2. myladeybugg
    Member
    Posted 1 year ago #

    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.

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

  4. myladeybugg
    Member
    Posted 1 year ago #

    Hey Mika,

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

  5. 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?

  6. myladeybugg
    Member
    Posted 1 year ago #

    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.

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

  8. myladeybugg
    Member
    Posted 1 year ago #

    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?

  9. 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?

  10. myladeybugg
    Member
    Posted 1 year ago #

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

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

  11. 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.

  12. myladeybugg
    Member
    Posted 1 year ago #

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

  13. myladeybugg
    Member
    Posted 1 year ago #

    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>
  14. Did you search the database for that?

  15. myladeybugg
    Member
    Posted 1 year ago #

    Yes. I used the search and replace tool.

  16. 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.

  17. myladeybugg
    Member
    Posted 1 year ago #

    I searched the database and there is only ONE http://. I navigated to it through an incognito window, and cleared all of my cookies, but still get the redirect loop. :(

    Thank you for the help thus far Mika! I really appreciate it!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.