I have a website that has a folder called News directly under the root directory, and then a folder called _lib inside the News folder (/News/_lib). I have a file called bob.php inside the _lib folder (/News/_lib/bob.php) that is accessed from /News/global.php. Now, because I include the contents of global.php into different files either in the root directory or in the News folder, I require ../News/_lib/bob.php (in global.php so that if it is in either the root directory or the News folder, it still goes to the same place. If you're confused:
ROOT DIRECTORY
-index.php:
------include News/global.php
-News [
------_lib [
------------bob.php:
------------------header and sidebar
------]
------
------global.php:
------------include ../News/_lib/bob.php
------
------index.php:
------------include global.php
]
Because I have the contents of global.php physically in-lined into files in different directories (I think), I need global.php to have ../News/_lib in case it is in the News folder or just the root directory. Now, I have subdomain forwarding so that m.mydomain.com goes to mydomain.com/News. When I have this, it then produces an error because it is trying to access m.mydomain.com/news/_lib/bob.php (in global.php), which turns out to be mydomain.com/news/news/_lib/bob.php, which doesn't exist. Because I have the subdomain forwarding, the folder /News seems to act like the root directory, so it doesn't go down another level before trying to access the News folder. If I've completely confused you, I'm sorry.
Basically, when I have it access m.mydomain.com, it tries to go to /news/news instead of /news because it can't go down another level. How do I fix this (I hope it isn't long because I reference different files in global.php a lot, so if the solution is short, that'd be great). Thanks in advance.
ROOT DIRECTORY
-index.php:
------include News/global.php
-News [
------_lib [
------------bob.php:
------------------header and sidebar
------]
------
------global.php:
------------include ../News/_lib/bob.php
------
------index.php:
------------include global.php
]
Because I have the contents of global.php physically in-lined into files in different directories (I think), I need global.php to have ../News/_lib in case it is in the News folder or just the root directory. Now, I have subdomain forwarding so that m.mydomain.com goes to mydomain.com/News. When I have this, it then produces an error because it is trying to access m.mydomain.com/news/_lib/bob.php (in global.php), which turns out to be mydomain.com/news/news/_lib/bob.php, which doesn't exist. Because I have the subdomain forwarding, the folder /News seems to act like the root directory, so it doesn't go down another level before trying to access the News folder. If I've completely confused you, I'm sorry.
Basically, when I have it access m.mydomain.com, it tries to go to /news/news instead of /news because it can't go down another level. How do I fix this (I hope it isn't long because I reference different files in global.php a lot, so if the solution is short, that'd be great). Thanks in advance.