-
MODX Staff
- 10,725 Posts
Ok, my only issue with Friendly Alias Paths is one relating to getting the root of the site. In local testing or when putting etomite in a folder other than the document root, the mapPath function is erroneously using $_SERVER['DOCUMENT_ROOT'] to determine the root path of the site. I think a simple configuration setting identifying the root path location of the modx installation would solve this. Thoughts or alternative suggestions?
Seems like it would be trivial to use
$_SERVER["SCRIPT_NAME"] instead and strip off the last part to get the path (for the URL).
Or, if you want something that matches the output of DOCUMENT_ROOT, use $_SERVER["SCRIPT_FILENAME"] and remove the last part.
Is that making sense to anyone else?