Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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?

share|improve this question
 
It might be a port forwarding problem. –  lazyCrab Jul 17 '13 at 8:58
 
^ Or a firewall and/or file sharing in windows is disabled –  DarkBee Jul 17 '13 at 9:13
 
@lazyCrab Could you describe it in more details?? –  Kordan Ou Jul 18 '13 at 2:36
 
@DarkBee The network links work when I visited the website on localhost. I think not the firewall issue and it's certainly shared. –  Kordan Ou Jul 18 '13 at 2:40
 
@KordanOu : What are the permisions on the share ? Does everyone have read rights ? (The share permissions, not the NTFS ones) –  DarkBee Jul 18 '13 at 6:35
show 4 more comments

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.