I have a windows server that I host a intranet based website on. I have recently made a webpage that lists some .doc and .pdf files that where uploaded to a specific directory via a php file. Now my issue is if I use remote desktop program to access the server and go to the folder where the word and pdf file is I can open the file fine. However when I go to the intranet based webpage that is hosted on the windows server and click on one of the files I get a The page cannot be found message instead of the browser downloading/opening the word doc or pdf.
So I am thinking this is some sort of setting in the server that is preventing the files from being able to be reconized as a file that should be accessible and able to be opened??

Any suggestions?
Thanks

It sounds like there are two issues here. The first, when you remote into the server and try to open the file, if the file doesnt not open this is likely to be a file association issue. You can just right click, select open width, select the program that will be used to open the file, and enable the checkbox to make that the default program. Alternatively, you can do this from the control panel, programs and features.

With regard to the accessing the files via a browser, it sounds like you haven't configured your web server by allowing the proper MIME type. The web server needs to know what to do with files other than .htm, .html, etc... Here is some information on configuring MIME types on IIS:

Allow IIS to Open Various File Formats

Hello

Thank you My issue is what you gave a resolution to in your second paragraph. However I followed the directions you pointed out and it still does not work. So when I go to lets say http://localhost/intranet/testdoc.doc the browser should trigger the ms word on my pc to open the file but instead I get the The page cannot be found message ?

If you are getting a page not found, it sounds like you are referring to the wrong path. Have you verified that the path is correct?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.