WordPress.org

Ready to get started?Download WordPress

Forums

Multisite redirect without www (2 posts)

  1. guestvibe
    Member
    Posted 1 year ago #

    If I visit domain.com as opposed to http://www.domain.com, I get a redirect loop. A similar problem arises if I try to view a blog post for one of my new sites, x.domain.com.

    This is the contents of my .htaccess file, which is what I was told to replace the current content with when installing multisites:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    
    # END WordPress

    Another problem I have is that the dashboard for my secondary site (at x.domain.com) isn't viewable - instead, it takes me to the dashboard for my primary site (domain.com).

  2. Roy
    Member
    Posted 1 year ago #

    I had the same. I have this in my htaccess above #BEGIN WordPress:

    # Fix www redirect
    <ifmodule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
    RewriteBase /

Topic Closed

This topic has been closed to new replies.

About this Topic