We have this need of uploading static html files that consist of documentation that is automatically generated from source code (for those who are curious: Javadoc files). Since the number of files can be large, the files generated periodically, and are essentially static (will never be modified, only replaced) we would like to be able to upload them directly under a given folder via FTP, and serve them directly, bypassing Modx, or at least having Modx serve these files "as is".
Sorry for my naive question (keep in mind I have just started playing around with the system): is it possible to configure some sort of routing rule that would indicate to Modx to serve whole folder trees as static resources ?
Thanks !
-
MODX Staff
- 12,272 Posts
I believe this works but you may need to make sure Apache processes .html files before .php ones.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
☆ A M B ☆
- 24,524 Posts
If you need to have a menu for these items, you could use a snippet to read the directory and generate the links for them.
-
MODX Staff
- 22 Posts
The simplest way to do this is to find the directory you are hosting MODx in, and add a subdirectory there. For example, on my test machine, my MODx is installed at:
/var/www
So, I do the following:
cd /var/www
mkdir docs
Make sure that you set the ownership of the directory correctly, and the rights, both so that you can upload the data and the server can serve it. Now, anything you put in that directory your web server will serve for you.
Let me know if I can be of any other help.
- Kevin
Kevin Marvin :: MODX, LLC