Can't figure out a path
Posted: Sun Jun 06, 2004 5:27 am
I'm working on a project at the moment and I'm stuck with accessing .doc (MS Word documents) that are safely stored outside the scope of a web browser.
My server hierarchy is:
ROOT
|------www
|------secure
|------documents
Obviously I can access files within the www by http://www.domain.com/blah.php and files within secure (it's all setup properly) by https://secure.domain.com/blah.php. For security reasons I have put some Word documents into the documents folder so that you can't type a direct URL into the browser to retrieve the file.
I have some HTML documents within the documents folder and I can view these using the: ../../documents method but if you try this with Word documents I don't know how to setup the headers and it displays the file - but as "gobble-de-gook". Basically, raw data.
Is there any way I can specify that it's a MS Word document and display the file in a new window?
Any help/comments would be appreciated.
Cheers,
Phil
My server hierarchy is:
ROOT
|------www
|------secure
|------documents
Obviously I can access files within the www by http://www.domain.com/blah.php and files within secure (it's all setup properly) by https://secure.domain.com/blah.php. For security reasons I have put some Word documents into the documents folder so that you can't type a direct URL into the browser to retrieve the file.
I have some HTML documents within the documents folder and I can view these using the: ../../documents method but if you try this with Word documents I don't know how to setup the headers and it displays the file - but as "gobble-de-gook". Basically, raw data.
Is there any way I can specify that it's a MS Word document and display the file in a new window?
Any help/comments would be appreciated.
Cheers,
Phil