Note: I am running apache (xampp) on windows server 2008.
Some more background info: We have great staff who are talented and hard working, but are often not good with computers. They work in Microsoft Word and share files in a network drive and I want to enable them to create/migrate content to share on the web without asking them to learn too much more. I can think of two ways to do this....
Method 1: Write some php code to enable the web server to access the documents stored outside of the web root.
Staff would work in MS Word creating pages with hyperlinks to navigate between them. Hopefully they can use mht files or we may have to go with word html files (and all the extra folders that would be created :-(. The problem I see is making hyperlinks in these documents work both when accessed directly from the network drive and when viewed via the web server. I thought I could write some php code to rewrite the hyperlinks when the pages are being viewed thfough the web server.
As an alternative to rewriting the links before they are shown, can I intercept the http requests somehow in order to retrieve the correct file/page from the network drive??
The easy part in this approach is to manage permissions. With php I can manage user accounts and restrict access to certain files (eg: files for teachers that students should not see).
Method 2: Create a symlink in the web root to the network drive where the files are stored.
If the links in the documents are relative links I think they should work both when the documents are opened directly from the network drive and when they are viewed via the web server. The problem will be managing permissions. If I don’t need to use php to retrieve the files I won’t have the opportunity to check if the user is allowed to access them. I guess I would need to tie the permissions of the logged in user to the permissions on the network folders somehow. Not too sure how I would do this.
I’ve done some googling on this option and it looks like you can authenticate a user using the ldap_bind function. But I think I would need a lot more to actually enforce folder permissions?? Would I need to find a library/class to help me implement this?
Sorry if this is unclear... it's a pretty broad question (collection of questions?). Any advice, tips, pointers greatly appreciated. I can do the research needed to develop the solution, but at the moment I'm not quite sure how to approach it.
Many thanks in advance,