-
- 26 Posts
I am using "login" to handle access to private pages.
Inside these pages I provide links to .pdf files on the same web server.
Now I noticed that the world can access these private documents when they type the URL directly.
http://<baseURL>/assets/intern/<DocumentName.pdf> can be opened outside the logged-in user.
How can I link access rights of external documents to a ModX user group?
Regards
Christoph
-
- 5,888 Posts
you can put a .htaccess - file to the pdf-directory with
and create a private 'static resource' for each pdf-file
Or you can store the files outside of the web root, and have the static resources point to the files.
You also need to create a custom Content Type for the .pdf files, set to "binary", as well as having the static resource's Content Dispositon setting be "Attachment". MODx will stream a binary static resource's target file.
-
- 26 Posts
Thanks a lot!
I choose Bruno's solution - This makes recreation of 100+ static resources a little easier (can copy original URL).
Thanks to Susan for the extra bit of detail - this saved me additional research in the documentation.