Workaround for href=“file://///…” in Firefox

后端 未结 6 660
南方客
南方客 2020-11-27 06:43

On an intranet site, let\'s say I want to link to a file on a share using UNC, at:

\\\\servername\\foldername\\filename.rtf

It seems the co

6条回答
  •  心在旅途
    2020-11-27 07:36

    As it turns out, I was unaware that Firefox had this limitation/feature. I can sympathize with the feature, as it prevents a user from unwittingly accessing the local file system. Fortunately, there are useful alternatives that can provide a similar user experience while sticking to the HTTP protocol.

    One alternative to accessing content via UNC paths is to publish your content using the WebDAV protocol. Some content managements systems, such as MS SharePoint, use WebDAV to provide access to documents and pages. As far as the end-user experience is concerned, it looks and feels just like accessing network files with a UNC path; however, all file interactions are performed over HTTP.

    It might require a modest change in your file access philosophy, so I suggest you read about the WebDAV protocol, configuration, and permission management as it relates to your specific server technology.

    Here are a few links that may be helpful if you are interested in learning more about configuring and using WebDAV on a few leading HTTP servers:

    • Apache Module mod_dav
    • IIS 7.0 WebDAV Extension
    • Configuring WebDAV Server in IIS 7, 6, 5

提交回复
热议问题