Support » Networking WordPress » Redirect loop problem after primary domain change.

  • Resolved linscami



    I manage a WordPress Multi-site portal and recently, for contractual reasons, we had to change the URL from to I followed these instructions and everything seemed to be working just fine:

    We needed to redirect people who accessed the site through to – no problem there. But when someone with an old link, like 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 /(.*)$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 ‘Redirect loop problem after primary domain change.’ is closed to new replies.