WordPress.org

Support

Support » Multisite » [Resolved] Redirect loop problem after primary domain change.

[Resolved] Redirect loop problem after primary domain change.

  • linscami

    @linscami

    Hello!

    I manage a WordPress Multi-site portal and recently, for contractual reasons, we had to change the URL from portaltagit.com to portaltagit.ne10.uol.com.br. I followed these instructions and everything seemed to be working just fine: http://wpengine.com/support/how-to-change-a-multi-site-primary-domain/

    We needed to redirect people who accessed the site through portaltagit.com to portaltagit.ne10.uol.com.br – no problem there. But when someone with an old link, like http://portaltagit.com/moda/17802 tried to access, they would be redirected automatically to the site homepage, not the post itself. I found an apparent solution, by adding this line to my htaccess file after the WordPress stuff:

    RedirectMatch 301 /(.*) http://portaltagit.ne10.uol.com.br/$1

    And again, the URL changed like I wanted it to, but I then I came across a new problem: This webpage has a redirect loop. And now I’m stuck. I don’t have any other redirects anywhere that I can possibly think of, and I really need the old links to work.

    Here is my complete htaccess file, without the RedirectMatch line, since it was throwing an error:

    # BEGIN WordPress
    
    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]
    
    # END WordPress

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Redirect loop problem after primary domain change.’ is closed to new replies.
Skip to toolbar