Forums

Wildcard Subdomains on an Aliased Domain for WP mu (1 post)

  1. pkbnaveen
    Member
    Posted 3 weeks ago #

    I've run into a bit of a setup issue. I have a primary domain being hosted with a dedicated IP. That works fine. Then I have another domain. It's Aliased to the primary domain but is served out of a different directory.

    So primarydomain.com is in root. A generic Wordpress install.
    Next domain is otherdomain.com it's in /nextdomain. It is a Wordpress MU install. I really need to be able to subdomain here. This will allow WP mu to handle blog1.nextdomain.com and blog2.nextdomain.com and so on.

    Normally, I would open the DNS "control panel" from my host, make a new A Record to wildcard everything. However, when I created a wildcard A Record on nextdomain.com, all subdomains went to primarydomain.com. At that point, primarydomain.com has no idea of what to do with blog1.primarydomain.com or blog2.

    My host says, "hey, you can fix that with the .htaccess file." So I'm all, "OK. That's what I figured. I'll get to it." No luck.

    So... how to get the wildcard subdomains in the aliased domain for Wordpress MU is the question. If I modify the .htaccess, is it the .htaccess in root or in /nextdomain?

    I found this :

    #handle example.org wildcard subdomains
    RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).domain2.com [NC]
    RewriteRule (.*) /domain2com [L]

    Now all the requests are redirected fine but another big problem !!

    Now the images/themes and includes are all jacked (technically speaking). It's wordpress, so I don't really have much to play with here.

    I found that someone else too had the same problem as me and he was able to resolve his issue !!

    Read this :
    http://www.webmasterworld.com/apache/3522593.htm

    Can someone please go through it and tell me the final code that i have to implement ???

Reply

You must log in to post.

About this Topic