The MU forums have moved to WordPress.org

blogs redirect to main blog (12 posts)

  1. lhurey
    Member
    Posted 14 years ago #

    all blogs will redirect if they are access with www after slash. http://sub-blog.mainblog.com works fine but http://www.sub-blog.mainblog.com will redirect to http://mainblog.com how to solve this?

  2. tdjcbe
    Member
    Posted 14 years ago #

    Last time we saw this, the mu was installed as an addon domain within cpanel. You haven't done this, have you? It needs to be installed as the main domain within the account.

    If not, maybe some server details and how you have it installed would be helpful.

  3. lhurey
    Member
    Posted 14 years ago #

    done with it and it was working fine. just don't know what is going on on my sub blogs...

  4. aeonscoop
    Member
    Posted 14 years ago #

    Hey, there's one...

  5. lhurey
    Member
    Posted 14 years ago #

    @aeonscoop,
    what do you mean?

  6. lhurey
    Member
    Posted 14 years ago #

    until now can't get it to work..

  7. VentureMaker
    Member
    Posted 14 years ago #

    Not sure what exactly you need to fix...

  8. lhurey
    Member
    Posted 14 years ago #

    @VentureMaker, all my blogs http://sub-blog.mainblog.com will redirect to http://mainblog.com if you type in the browser like this http://www.sub-blog.mainblog.com

    I want to know how to fix this.

  9. VentureMaker
    Member
    Posted 14 years ago #

    First of all, do you have any extra stuff in .htaccess?
    Later, get rid of www - make all domains and subdomains behave in a way that entering http://www.domain.com will go to http://domain.com
    Different hosts have different tools to achieve this.

    Make sure you have wildcard DNS set up properly, make sure your main domain does not have redirects, aliases, other things.

  10. lhurey
    Member
    Posted 14 years ago #

    @VentureMaker,
    here is my .htaccess
    RewriteEngine On
    RewriteBase /

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    #<Directory /home/ilikeceb/public_html>
    #AllowOverride FileInfo
    #</Directory>
    # compress all text & html:
    #AddOutputFilterByType DEFLATE text/html text/plain text/xml

    # Or, compress certain file types by extension:
    <Files *.html>
    #SetOutputFilter DEFLATE
    </Files>
    I have wild card DNS set up properly and I don't have any redirects, aliases etc...

  11. VentureMaker
    Member
    Posted 14 years ago #

    What's your domain?

  12. lhurey
    Member
    Posted 14 years ago #

    @VentureMaker
    here is my domain: http://ilikecebu.com
    sub-blogs:
    http://ceburestaurants.ilikecebu.com
    http://cebuano.ilikecebu.com
    they will redirect to my main blog if i will put www after slash on the sub-blogs.

About this Topic