Title: multisite installation redirection problem possibly htaccess issue
Last modified: August 20, 2016

---

# multisite installation redirection problem possibly htaccess issue

 *  Resolved [kaleidoscopeint](https://wordpress.org/support/users/kaleidoscopeint/)
 * (@kaleidoscopeint)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/)
 * Hi, This is what i have :
    site1 is in the main html directory /html/ its a sub
   directory install **wpconfig:**
 *     ```
       define('WP_ALLOW_MULTISITE', true);
       define( 'MULTISITE', true );
       define( 'SUBDOMAIN_INSTALL', false );
       $base = '/';
       define( 'DOMAIN_CURRENT_SITE', 'site1.com' );
       define( 'PATH_CURRENT_SITE', '/' );
       define( 'SITE_ID_CURRENT_SITE', 1 );
       define( 'BLOG_ID_CURRENT_SITE', 1 );
       ```
   
 * **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).*) $1 [L]
       RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
       RewriteRule . index.php [L]
       ```
   
 * Site 2 is in /html/site2/
    **wp-config:**
 *     ```
       define('WP_ALLOW_MULTISITE', true);
       define( 'MULTISITE', true );
       define( 'SUBDOMAIN_INSTALL', true );
       $base = '/site2/';
       define( 'DOMAIN_CURRENT_SITE', 'site2.com' );
       define( 'PATH_CURRENT_SITE', '/site2/' );
       define( 'SITE_ID_CURRENT_SITE', 1 );
       define( 'BLOG_ID_CURRENT_SITE', 1 );
       ```
   
 * **htaccess:**
 *     ```
       RewriteEngine On
       RewriteBase /site2/
       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]
       ```
   
 * I have site2.com set up with a wildcard configuration, this was done by the hosting
   people. The problem is that when i go to 123.site2.com it redirects me to site1.
   com . Site 2 has its own domain name pointing to the site2 directory. When I 
   go to site2.com it goes to the right place, the problem is the subdomains redirecting
   to site1.com.
    Any help is greatly appreciated. Thanks DD

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654376)
 * > Site 2 is in /html/site2/
 * That’s not Multisite. Multisite doesn’t have a second ‘folder’ for a second site,
   it’s all virtual. UNLESS you’re trying to setup site2 as a separate multisite
   instance, we’re doing this wrong.
 * ASSUMING site2 is an addon domain, the .htaccess and wp-config should NOT point
   to /site2/ but just /
 * Why? Because insofar as site2 knows, it IS root.
 *  Thread Starter [kaleidoscopeint](https://wordpress.org/support/users/kaleidoscopeint/)
 * (@kaleidoscopeint)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654404)
 * My apologies, upon reading the question again i realized it was “hazy” at best.
   You assumed correctly, they are both multisite installs, and the addon domain’s(
   site2) original wp-config and htaccess are below. Any subdomain request ie. 123.
   site2.com gets redirected to site1.com.
    Thanks dd
 *     ```
       define( 'MULTISITE', true );
       define( 'SUBDOMAIN_INSTALL', true );
       $base = '/';
       define( 'DOMAIN_CURRENT_SITE', 'www.tellyourlovestory.com' );
       define( 'PATH_CURRENT_SITE', '/' );
       define( 'SITE_ID_CURRENT_SITE', 1 );
       define( 'BLOG_ID_CURRENT_SITE', 1 );
       ```
   
 *     ```
       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]
       ```
   
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654412)
 * That sounds like the way you set up subdomains, I’m afraid. Double check with
   your hosts if the wildcard subdomain for site2 is pointed at /public_html/ or/
   public_html/site2 (it SHOULD be the latter)
 *  Thread Starter [kaleidoscopeint](https://wordpress.org/support/users/kaleidoscopeint/)
 * (@kaleidoscopeint)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654420)
 * This is the email I got from my hosting people in regards to why the subdomain
   was redirecting to the main site. eight32.com is site1.com and premiumwebspots.
   com is site2.com.
    Thanks DD
 * > As it turns out, this is working properly. It appears there is a hidden redirect,
   > somewhere, that is causing this. Below are the DNS results, the http headers
   > from my browser, as well as the entries from the httpd.conf file.
 * $ host premiumwebspots.com
    premiumwebspots.com has address 69.36.181.212 $ host
   reedstest.premiumwebspots.com reedstest.premiumwebspots.com is an alias for premiumwebspots.
   com. premiumwebspots.com has address 69.36.181.212
 * [http://april.premiumwebspots.com/](http://april.premiumwebspots.com/)
 * GET / HTTP/1.1
    Host: april.premiumwebspots.com User-Agent: Mozilla/5.0 (Windows
   NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0 Accept: text/html,application/xhtml
   +xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding:
   gzip, deflate DNT: 1 Connection: keep-alive
 * HTTP/1.1 302 Found
    Date: Tue, 27 Mar 2012 17:20:44 GMT Server: Apache/2.0.52(
   Red Hat) X-Powered-By: PHP/5.3.8 Location: [http://eight32.com/](http://eight32.com/)
   Content-Length: 0 Keep-Alive: timeout=1, max=100 Connection: Keep-Alive Content-
   Type: text/html ———————————————————-
 * <VirtualHost *:80>
    ServerName premiumwebspots.com ServerAlias [http://www.premiumwebspots.com](http://www.premiumwebspots.com)
   DocumentRoot /var/www/html/premiumspots </VirtualHost> <VirtualHost *:80> ServerName*.
   premiumwebspots.com ServerAlias www.*.premiumwebspots.com DocumentRoot /var/www/
   html/premiumspots </VirtualHost>
 * Where redirects are considered custom, technical support is not able to fix them
   for you, however, I have looked in all the normal files that would do this, and
   cannot find anything that would cause this.
 *  Thread Starter [kaleidoscopeint](https://wordpress.org/support/users/kaleidoscopeint/)
 * (@kaleidoscopeint)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654450)
 * I just read up a little on .htaccess rules and they said that rules affect all
   the directories in the directory that the .htaccess file is in. Could this be
   the issue? Site1’s .htaccess file is taking over control.
 *  [Axel13](https://wordpress.org/support/users/axel13/)
 * (@axel13)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654455)
 * You wouldn’t happen to use a plugin that copies all settings from one site to
   another, like YD Network-wide options?
    I’ve had a similar situation, noticed
   it was my mistake setting the home &/or siteurl of 123.site2.com to site2.com
   instead of the subdomain.
 *  Thread Starter [kaleidoscopeint](https://wordpress.org/support/users/kaleidoscopeint/)
 * (@kaleidoscopeint)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654465)
 * No I did a fresh install on both of them.
 *  [Axel13](https://wordpress.org/support/users/axel13/)
 * (@axel13)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654468)
 * Am I assuming correct that you have 2 wordpress installations? I think you need
   only the one in the root, or better yet, only the one in the root could be a 
   multisite.
 *  Thread Starter [kaleidoscopeint](https://wordpress.org/support/users/kaleidoscopeint/)
 * (@kaleidoscopeint)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654471)
 * I want, and have 2 multisite installations, one is in the root, and another is
   in a subdirectory, but apparently the root installation is causing problems with
   the redirection of the one in the subdomain.
 *  [Axel13](https://wordpress.org/support/users/axel13/)
 * (@axel13)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654473)
 * > 2. Install WordPress 3.3.1
   >  Install WordPress 3.3.1 to the root of your public_html
   > directory. It has to be at the root or the multi-site feature won’t work. Follow
   > the instructions for Installing WordPress in the Codex.
 * source: [http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite](http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite)
 * I guess that’s not good news, but it’s how it is 🙁
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654482)
 * > Could this be the issue? Site1’s .htaccess file is taking over control.
 * Highly unlikely…. I mean, possible yes. You can test by renaming site1’s .htaccess
   to old.htaccess and see what happens.
 * (Axel – You don’t HAVE to have WP in root, that’s something else. It could be
   clearer, but I promise you, a subdirectory is fine).
 *  Thread Starter [kaleidoscopeint](https://wordpress.org/support/users/kaleidoscopeint/)
 * (@kaleidoscopeint)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654484)
 * I’m going to move site1 to another directory and use another domain and see if
   that solves the issue. Thanks for your help.
 *  Thread Starter [kaleidoscopeint](https://wordpress.org/support/users/kaleidoscopeint/)
 * (@kaleidoscopeint)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654523)
 * Ok finally got this sorted out!
    I moved the Multisite install over to its own
   directory with a dif domain name and nothing. I then got back to the hosting 
   ppl and finally ran into one that had a clue, and wanted to be helpful.
 * > [12:13:21 PM] It looks like the httpd.conf file is trying to set the wildcard
   > as its own virtualhost, using ServerName, instead of ServerAlias.
   > : [12:22:32 PM] Technically, the site manager doesn’t support this sort of 
   > wildcard domain configuration, and is thus beyond the scope of our technical
   > support. However, you simple need to edit “/etc/httpd/conf/httpd.conf” around
   > line 1150 and set the ServerName to “premiumwebspots.com” and the ServerAlias
   > to “*.premiumwebspots.com”
 * This is what the settings were looking like before:
 * >  <VirtualHost *:80>
   >  ServerName *.premiumwebspots.com ServerAlias www.*.premiumwebspots.
   > com DocumentRoot /var/www/html/premiumspots </VirtualHost>
 * I made the changes restarted the server and bingo!
    Thanks for the help guys.
   David

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘multisite installation redirection problem possibly htaccess issue’ is
closed to new replies.

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 13 replies
 * 3 participants
 * Last reply from: [kaleidoscopeint](https://wordpress.org/support/users/kaleidoscopeint/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/multisite-installation-redirection-problem-possibly-htaccess-issue/#post-2654523)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
