Support » Fixing WordPress » WP works fine with direct link, but Don’t with subdomain

  • Hi guys!

    I’m having a weird problem.

    I have a WordPress 2.3 instalation at . I did setup a subdomain to point to /wp directory at my hosting plan. But it do not work. Via full path everything is fine. Via subdomain, I am redirected to www at my domain.

    Subdomain is ok.

    So, just for test, I did put an index.html at and… Eureka!!! It works! Not redirected to . When I moved index.html the problem was back.

    Somthing It’s wrong in my WP 2.3 code that redirects to root directory. Some ideas?

    Thanks in advance,


Viewing 8 replies - 1 through 8 (of 8 total)
  • Well in theory, in Options->General your WordPress address (URL) and your Blog address (URL) would need to be

    Please review Moving WordPress.

    Hi MichaelH!

    I don’t think that is the problem, but I’ll try it and will be right back to give a feedback.



    Hi again!

    I was right. It won’t works and plus me another problem.

    Right after changed blog URL to I was redirected to to relogin. I filled the filds with my login and password and WP complaints about cookies. I removed all privacy filters and still can’t login. So I tryed and i did log into WP and turn changes back and everything was functional again. Except by the damm subdmain that simly refuses to work.

    I was wondering if in some code’s part have some root directory ling… I Don’t know…. 🙁

    I’m not so good in PHP to discover the problem alone… 🙁

    So… Anymore suggestions?

    Thanks in advance,


    Just so you know, this link:

    eventually takes me to:

    Hi Michael!

    Thanks a lot for you attention and patience.

    Let me make myself more clear.

    English is not my native language and I have some problems to make myself clear sometimes.

    I am building an website at . While this website is not finished yet and I have an redirect javascript to move requests from to

    It’s expected. Not a problem.

    The problem is:

    I can access the blog without any problems through URL . /wp is a folder/directory at root of my hosting plan. Blog is almost ok. So I created a subdomain called that points to that /wp directory.

    Like you must know, at WordPress main directory we do not have an index.html. We have only an index.php, that is executed when or .

    With it’s all ok. The blog shows without any problems.

    With index.php don’t do his job and redirects to Like I said above, that is being redirect to, so you finnaly goes to that url.

    I had a big and unfair fight with my hosting support. I was blamming them, telling that their subdomains system was kakked. But I was completely wrong. They did a simple test that proves to me that the real problem was the WP code. They put an index.html at WP directory and sobdomain works fine.

    So, the problem is someplace of WP code…

    When I did what you suggest before, I cannot access the blog. To access it I had to take the absolute path to wp-login.php

    And now? What can I do?


    Thanks again,


    Based on what I have seen here in the forum:
    – WP never works well with this kind of “fake” subdomains. Fake in this case meaning = being redirected to another subfolder.
    – In my cPanel I can set up a subdomain without redirecting it anywhere, existing as its own entity. WP works well in it.

    Generally, using all kind of tricky redirects doesn’t work well with WP, sorry.

    I was preparing to move my wordpress folder from to and started doing research to be sure that I did it right.

    This thread leads me to believe that it can’t be done, but I want to clarify before I give up. I’m adding to this thread because I believe I’m asking the same question as miacao.

    When I asked my webhost to set up the subdomain for me (I don’t have cpanel or vdeck or any of that mainstream stuff) he asked if I wanted a folder within my domain that just points to the subdomain but still resides in or if I wanted to set up actual separate domain (I’m sure he used some different and more correct terminology) like, which would require me to log in separately to manage that subdomain.

    I guess we opted with the first choice.

    My question is, when moving wordpress to the new folder and changing the URI in the admin > options > admin panel, couldn’t I set the wordpress URI to: (where the wordpress folders reside)
    and the blog URI to:

    or does it make sense to set them both as

    I’m loathe to “test it out” lest I get stuck then having to fix the entry in the database… not my forte and seemingly intimidating from the instructions if you mess up the URI entry.

    Of course… the text in this page leads me to believe that what I want to do is indeed possible. Can anyone verify that this method works? I guess i could just start looking for wordpress blogs…

    “You may have created a subdomain, and installed WordPress into Under Options, General look for the WordPress address (URI): field. Change it to read: The Blog address (URI): field should still read”

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP works fine with direct link, but Don’t with subdomain’ is closed to new replies.