Support » Networking WordPress » Subdomains keep redirecting to mainsite

  • Resolved genughaben


    Dear all,

    although I kept searching and already found many threads with comparable problem descriptions I could not figure out yet what goes wrong in my case.

    I installed a fresh WP 3.5.1 with Multisite Option using WP MU Domain Mapping in the root folder of my server.
    I use the subfolder-option for multisites. I also tried using the subdomain-option – which did not make any differen: I got the same error.
    As long I do not use any other domains everything works fine.

    I have my mainsite (1) and my subfolder-site (2)

    When I now add another (pointing to on the cpanel of my host) and mapped on I cannot enter my subsite. I also cannot even enter the subsites admin-panel any more.
    As soon I make the mapping entry “no primary” I can enter the subsite again but do not see the wished as url but again.

    Content of my wp-config.php

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', '');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    Content of my .htaccess

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [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]

    content of my 000-default (in apache2/sites-enabled):

    <VirtualHost*:80>                                                              ServerAdmin webmaster@localhost
            ServerAlias *
    	ServerAlias *
            DocumentRoot /var/www/
            <Directory />
                 Options FollowSymLinks
                 AllowOverride all
            <Directory /var/www/>
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride all
                  Order allow,deny
                  allow from all
            ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
            ErrorLog /var/log/apache2/error.log 
         # Possible values include: debug, info, notice, warn, error, crit,
         # alert, emerg.
            LogLevel warn
            CustomLog /var/log/apache2/access.log combined
            Alias /doc/ "/usr/share/doc/"
            ProxyRequests Off
            ProxyPass /olat/ http://localhost:8080/olat/
            ProxyPassReverse /olat/ http://localhost:8080/olat/
            <Location "/olat/">
                    Order allow,deny
                    Allow from all

    I do not now whether this is of further importance but :
    – I am using an ubuntu clound server.
    – And another thing I stumpled upon in another thread if I walk in the super admin panel in “settings->domains” I happen to have only one entry for with id2.

    Very happy to hear suggestions from anybody 🙂

    Kind regards

Viewing 1 replies (of 1 total)
  • I found the solution on my own: I had to add a wildcard A-Record to my IP adress and I also had a problem with domain-mapping.php residing in mu-plugins AND plugins folder – it should only reside in plugins (in my case).

    Kind regards

Viewing 1 replies (of 1 total)
  • The topic ‘Subdomains keep redirecting to mainsite’ is closed to new replies.