Hello Mrhaw,
Yes, I found this routine also. I changed the line below
$alias = preg_replace('/[^\.A-Za-z0-9 _-]/', '', $alias);
to the following:
$alias = preg_replace('/[^\.A-Za-z0-9 _-\/]/', '', $alias);
This gives not the desired effect. The slash is still removed.
After some searching I found the solution.
Can the MODX-experts please check if I not mess anything up
in another area of MODX?
the solution lies in the fact that the function checks for a plugin in the OnStripAlias event. In MODX 1.0.3 there is such a plugin. It’s called "transalias". That plugin has a number of datafiles what to translate.
Two files in there mention the slash to be translated to an empty string: utf8.php and utf8owercase.php.
So, in those two files, the following lines should be removed: (They are at the top of the files)
// File/path punctuation (usually not wanted, but might be wanted in some cases)
'/'=>'',
Since they are datafiles in the plugin, I don’t think this is a bug which should be changed. It is just a feature which should be clearly documented on the effect.
So, "
if you want to have slashes in the url and don’t want to switch on friendly alias path: Change the files in the transalias plugin."
(Google, do your thing and pick this up!!)
Regards,
Bert