Sorry I took so long to respond. I didn't notice the reply (was on page 2 of the thread).
It looks like it was working, however I was using Aliases as well, and so when an Alias is activated then redirect rules are never executed. There are some libraries which are shared by several sites. I would like to set this as an Alias, ie.
Alias /cms/ /usr/local/src/cms
However, when the CMS is accessed, the Modrewrite rules are never executed (as they have to be located within a <directory> tag, and the Alias directives must be outside of directory tags), therefore the server environment variable is never set. The code needs this variable in order to know which site is accessing it at any given time.
Any ideas how to get around this limitation? Is there any way to set a dynamic environment variable (ie. the 3rd element in the domain name <this>.domain.com) /outside/ of a directory tag so that it's set even if an alias takes precedence?
I really want to avoid using symlinks to link to the external code.
Thanks for any further help.
I checked it and no luck. If I set it to TEST:test and dump all the environment variables, the words TEST or test never show up
Where? The PHP $_SERVER array?
- Code: Select all
Is all my syntax correct here?
Looks fine to me.