Support » Fixing WordPress » Subdomains

  • Hey folks. I’ve been trying to get subdomain redirects working, and I haven’t had any luck.

    I tried the 3 subdomain plugins, and none of them seemed to work. Something, somewhere is 301ing me before any of them kick in.

    I have the wildcard DNS entry in place. If I go to, I get dumped into

    If I make a simple test.php and put this in it

    if (stristr($_SERVER[“HTTP_HOST”], ‘test’))
    header( ‘Location:‘ ) ;

    and go to, I do in fact get dumped to google. So that’s a start.

    Using the Automatic Subdomains plugin, nothing happens.

    Looking at its code, it’s fairly simple.


    And then in tjg_as_get_subdomain, it tries to figure out whether or not it needs to do a redirect.

    The PROBLEM is that I’ve already been 301’d out of and into before tjg_as_get_subdomain ever fires. I put that code snippet from test.php in that function, and I’m getting sent to, not google.

    So something is killing my subdomains before any of these plugins can kick in. It can’t be my server, since my test.php worked: clearly the subdomain is coming through to PHP. So it’s got to be something in WP? Right? Any ideas?

Viewing 1 replies (of 1 total)
  • It would appear that redirect_canonical is causing the subdomain to be removed before we get as far as ‘init’.

    Hmm. What to do about it….

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