How to create a hyperlink to a shared network directory or file?

I checked the following two related discussions:
1. How to create a hyperlink to a local executable file? 2. URL of the Windows public folder
3. Error accessing server URL in Chrome - unexpectedly
4. Firefox links to local or network pages do not work

The following links work when I visited the site on localhost. That is http://localhost .

 <a href="\\172.21.1.123\DIR">A Shared Network Directory</a> <a href="file://172.21.1.123\DIR">A Shared Network Directory</a> <a href="file://///172.21.1.123\DIR">A Shared Network Directory</a> 

But when I visited http://172.21.1.123 , all of the above links have no answer. The debug console shows that Not allowed to load local resource: file://172.21.1.123/DIR .

Test conditions (both have the same result):
- Chrome 28.0.1500
- IE 10

If this is due to security concerns, is any configuration disabled? Or any idea?

+6
source share
1 answer

The reason you cannot connect to a network resource from an external / hosted / live site is due to the security features of recent browsers such as Firefox.

You can only open shared resources on a local network from a local HTML document.

The only way around this is to install a plugin for your browser that removes or disables this security feature, as far as I know.

0
source

Source: https://habr.com/ru/post/1491816/


All Articles