Wordpress is installed my root directory(/root/). I have a subdomain(dammani.techbrij.com) and I want to access some files of main domain from sub domain. I have done following thing:


Now, "http://techbrij.com/dammani" is working fine, but "http://dammani.techbrij.com" not working. It redirects to main domain.

If i give any wrong path in include_once, I'm getting error without redirect. Let me know how to fix this issue.

Edit: I'm using same database for my app. So i want to use same wpdb functionality for subdomain.

  • It would be helpful to explain why you're including those files so anyone answering is in a better position to advise you on alternative methods. It may even serve as a better question to ask "How do i X" (whatever you're attempting to do) rather than "I did X and it caused Y, how do i fix it"... – t31os Feb 2 '11 at 15:45

I am not sure if that is cause of your issue, but you do not load WordPress in correct way.

Please see Integrating WordPress with Your Website in Codex for details.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.