WordPress.org

Ready to get started?Download WordPress

Forums

subsites appears to redirect to itself (3 posts)

  1. robsheppard
    Member
    Posted 1 year ago #

    I have a multisite network using subdirectories like this:

    example.com
    example.com/issue001
    example.com/issue002
    ...
    example.com/issueNNN

    My parent site returns 200. All good.

    My subsites look OK in a browser, but when analysing using an SEO analyser tool, it reports them as returning 301 and having no title/meta/first para/body etc, and using google webtools "fetch as googlebot" I get this:

    example.com/issue001:
    The page seems to redirect to itself. This may result in an infinite redirect loop. Please check the Help Center article about redirects.

    HTTP/1.1 301 Moved Permanently
    Date: Mon, 10 Sep 2012 10:45:39 GMT
    Server: Apache/1.3.42 (Unix) Sun-ONE-ASP/4.0.2 Resin/2.1.13 mod_fastcgi/2.4.6 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.8e-fips-rhel5
    X-Pingback: http://example.com/issue001/xmlrpc.php
    X-Powered-By: PHP/5.3.15
    Location: http://example.com/issue001/
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=UTF-8

    Could this be a problem with the "www" redirect to "non-www" and multisite interfering with each other?

    Here is my .htaccess file contents

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>
  2. I did a fast check and mine are 200, as expected.

    I don't see a www redirect in your htaccess. Why do you think it's doing so?

  3. robsheppard
    Member
    Posted 1 year ago #

    Thanks Mike. I wondered if it was something in the internal workings of multisite, but after looking again last night I think it might be a consequence of my site being hacked a little while ago, which I have cleaned but maybe not everything. I'm going to have another look for compromised files and db entries.

Topic Closed

This topic has been closed to new replies.

About this Topic