• Resolved bengunr

    (@bengunr)


    I have a multisite install with subdomain addresses. As far as I know this issue only occurs on one of the 100+ sites on this install: https://it.blogs.unr.edu.

    If you go to https://it.blogs.unr.edu/outages/ (and this is most noticeable in firefox) there is a 301 Redirect infinite loop. Pressing refresh (sometimes a few times) will eventually get you to the page (Chrome automatically retries and gets you into the page). This also occurs on other pages on this site, such as /projects/.

    Our .htaccess file matches the one located on the codex for subdomains on the latest version.

    Additionally, I have tried creating a blank page with little content, and the redirect can occur as well.

    Posts adhere to the permalink structure set in “Settings” of /year/month/title – they never experience the redirect loop issue.

    I tried changing the permalink structure back to “plain” but this redirected /outages/ to the front page.

    Finally, if I go to https://it.blogs.unr.edu/?p=8 then there are no redirect problems.

    Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @bengunr did you get this problem fixed? I tried your link and did not have any trouble (no redirect or infinite loop).

    If you did resolve this issue, please update with how you fixed it (it might help someone else with the same problem some day) and mark this resolved so we know it’s closed.

    If you’re still having trouble, can you post with more details?

    Thanks!

    Thread Starter bengunr

    (@bengunr)

    After experimenting for a long time, I noticed that the issue was with the trailing slash at the end of the URL.
    https://it.blogs.unr.edu/outages – redirect error
    https://it.blogs.unr.edu/outages/ – loaded the page fine.

    I also confirmed that this was the case for entering the URL of any page in any of the multisite sites.

    When I entered in the url with no trailing slash, a trailing slash was added to the URL. However, I reckon that the browser cache still refused to redirect the page properly.

    So, I added the following to the .htaccess file, and that appears to have fixed the problem:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*[^/])$ /$1/ [L,R=301]

    Basically, this code takes any URL not ending with a slash, and redirects them to the URL with the slash.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multisite Subdomain 301 Redirect Loop on Pages (not Posts)’ is closed to new replies.