Forums

[closed] Redirect loop on subdirectory sites (12 posts)

  1. bnaian
    Member
    Posted 1 year ago #

    I installed WP 3.0.4 on our server last week. I followed all of the setup directions for multisite, and it seemed to work fine. The only problem is that when I link to one of my child sites (our.network.com/blog1, our.network.com/blog2, etc) without using a trailing slash, it shows a redirect loop error. With a trailing slash, it's fine.

    I tried adding code to the .htaccess to add a trailing slash to all URLs, but it made no difference.

    I'd appreciate any advice on this. Thank you.

  2. What's in your .htaccess file?

  3. bnaian
    Member
    Posted 1 year ago #

    Default multisite code for subdirectories is now in my htaccess:

    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).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

  4. That looks good. What plugins?

  5. bnaian
    Member
    Posted 1 year ago #

    No plugins currently. This is a completely fresh WP 3 install. Really strange issue.

  6. Yeah that is odd. I wonder if it's a weird httpd.conf setup. Are multi views on?

  7. bnaian
    Member
    Posted 1 year ago #

    This is the vhosts record for the install (with vital info blacked out)

    <VirtualHost ---.---.---.144:80>
    ServerAdmin email@host.com
    DocumentRoot /var/www/sub.domain.com
    ServerName sub.domain.com
    ErrorLog /var/log/apache2/sub.domain.com.error_log
    TransferLog /var/log/apache2/sub.domain.com.access_log
    </VirtualHost>

    I hope this makes sense - We have a WPMU install on the same server using the same domain. Could that interfere and cause this problem (or need a special vhosts setting) even though the subdomain is different?
    The WPMU is called later in the vhosts file and uses the subdomains *.domain.com, so it shouldn't interfere, but at this point, I'm willing to look at anything.

    I'm a bit of a novice on httpd.conf, so if there are other settings that I should try, please let me know.

    Thanks for your effort so far.

  8. Its not in the virtual hosts. It's part of the AllowOverride section.

  9. bnaian
    Member
    Posted 1 year ago #

    It looks like Multiviews is enabled under Options. Should it be?

  10. Yes. What are the options set to?

  11. Mikko Virenius
    WordPress-asiantuntija
    Posted 4 months ago #

    I have exactly same problem with WordPress 3.3.1. Any suggestions?

  12. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 4 months ago #

    Same answer. Probably your httpd.conf file.

    And Mikko Virenius, after 11 months of no reply, it's okay to make your own topic :) In fact, we'd rather you did.

Topic Closed

This topic has been closed to new replies.

About this Topic