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:
include_once('/root/wp-config.php'); include_once('/root/wp-load.php'); include_once('/root/wp-includes/wp-db.php');
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.