multiple, multisite installations on one vhost. possibly and htaccess issue

I have one multisite already installed and its in the root directory /html/ and i have domain mapping going there and of course the main domain is pointed to that directory this install uses a subdirectory format . I want to install a multisite with subdomain format in /html/other/ i pointed the domain to this directory, and have the wildcard set up properly, and when you go to the site other.com it goes to the correct place , but when you visit a subdomain 123.other.com it takes you to the main installation html.com. Any ideas? is this a .htaccess issue? Thanks for your time.
DD

    kaleidoscopeint

    Hi Tim , thanks for the help. The site in question is premiumwebspots.com and the main site is eight32.com anything.premiumwebspots.com redirects to eight32.com . My hosting provider set up the wildcard domain at *.premiumwebspots.com pointing to the directory where the multisite installation for premiumwebspots is which would be /html/premiumspots/.
    Thanks again for your help.
    DD

    Timothy Bowers

    My hosting provider set up the wildcard domain at *.premiumwebspots.com pointing to the directory where the multisite installation for premiumwebspots is which would be /html/premiumspots/.

    Can I please see a screenshot of those DNS settings.

    I'm sure they did it, but I'd like to see first to be absolutely sure first so we can eliminate it for sure and we don't start checking htaccess, settings, etc if it is.

    I've seen hosts advise the set up before and it hadn't been so worth me seeing a screen to double check. Also whats in your htaccess?

    Thanks.

    kaleidoscopeint

    Dear David,

    Thank you for your patience on this issue. I apologize for the long delay in our response to you.

    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/

    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/
    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
    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.

    At this point, the only thing I can do is suggest you have a web developer take a look at it for you.

    Please let me know if you have any other questions or concerns.

    This is what the guy sent me.
    Thanks
    DD

    kaleidoscopeint

    Yeah it does! Weird...
    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

    kaleidoscopeint

    Hey Tim, thanks for taking the time to look around, I was reading a little bit about htaccess and it said that the rules in an htaccess file affect all the directories in the directory that the file is located in. Do you think the htaccess from eight32 could be affecting the other installation? A bit later tonight i'm going to disable the htaccess for eight32 and test my hypothesis if indeed it is causing the issue i'll just move the site to another directory.

    Timothy Bowers

    Part of the things I tested was that.

    It was also the reason I suggested separating those folders further.

    Yeah htaccess is recursive, however if a htaccess is used in a sub folder that should take precedence.

    When I was testing I briefly deleted all the rules from both files and then tried a random url but the issue persisted. so I enabled them quickly to ensure there was not prolonged downtime. I think I mentioned in my mail unless there was a cache issue there it should have ensured the htaccess was not at play and I did test a permlink to be sure.

    Ohh and that link above works now, odd right?

    Is there a reason you can't just separate those folders?

    So the sub folder multisite is out of the others root path.

    Take care

    kaleidoscopeint

    OMW this took a while! I was moving back to the states and had a couple of "snafoos" with that, but i was working on moving the Multisite installation to its own directory. I got the final domain moved over and checked out and all the files moved out of the main directory and NOTHING changed !! I realized this had nothing to do with Wordpress and immediately got online with my hosting people.

    Colin: [11:53:08 AM] I'm checking the configuration.
    [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.
    david: [12:14:11 PM] ok
    [12:14:19 PM] can that be fixed
    [12:14:23 PM] ?
    Colin: [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"
    david: [12:23:32 PM] you rock man!
    Colin: [12:26:41 PM] Is there anything else I can help you with?
    david: [12:28:22 PM] yeah
    [12:28:49 PM] so I should remove the www before the server alias ?
    Colin: [12:28:59 PM] Yes.
    david: [12:29:19 PM] and the asterisk before the server name ?
    Colin: [12:29:38 PM] Yes.
    david: [12:30:41 PM] ok you rock again!! thanks have a great one !

    So I made the changes restarted the server and problem solved !! It worked out well, I didn't really like having the clutter of a wp installation in the main directory. Thanks,
    David

    Timothy Bowers

    Ah so it was still a DNS issue, related to the VHOST and how it was set.

    Simply it wasn't set up right by the looks of their message and instruction. I presume when it was set up, it was done through some automated system.

    But hey, this has been a learning experience for us both albeit tiring and long for you.

    The end result is the most important and you got that sorted! Its all that matters

    Take care buddy!