Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I've checked the following two related discussions:
1. How do I make a hyperlink to a local executable?
2. An URL to a Windows shared folder
3. File Url Cross Domain Issue in Chrome- Unexpected
4. Firefox Links to local or network pages do not work

The following links work when I visited the website 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 with http://172.21.1.123, all of above links have no response. The debug console shows that Not allowed to load local resource: file://172.21.1.123/DIR.

Test Environment (Both of them have the same result.):
- Chrome 28.0.1500
- IE 10

If it is due to the security reason, any configuration to turn off? Or any idea?

like image 615
Kordan Ou Avatar asked Jul 17 '13 08:07

Kordan Ou


People also ask

Can you hyperlink a shared folder?

Open File Explorer, go to the Network section, and double-click or double-tap on the PC that stores the file, folder, or library you want to link. This shows you a list of all the folders that are shared with the network. Browse until you find the specific file, folder, or library for which you want the direct link.

How do I create a hyperlink to a file path?

Create a hyperlink to a location in another documentPress Ctrl+K. You can also right-click the text or picture and click Link on the shortcut menu. Under Link to, click Existing File or Web Page. In the Look in box, click the down arrow, and find and select the file that you want to link to.

How do I create a link to a shared folder in Windows?

Right click on the Computer icon on the desktop. From the drop down list, choose Map Network Drive. Pick a drive letter that you want to use to access the shared folder and then type in the UNC path to the folder. UNC path is just a special format for pointing to a folder on another computer.


1 Answers

The reason that you cannot link to a network share from an external/hosted/live site is because of security features of latest browsers like Firefox.

You can only open local network shares 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.

like image 187
Enkari Avatar answered Oct 05 '22 02:10

Enkari