是否有办法将浏览器重定向到本地网络上的文件


Is there a way to redirect a browser to a file on the local network?

我想知道是否有可能重定向到这样的URL:

''central'public'blah'test.html
在PHP中

?我们希望在网站上添加一个链接,以便员工快速访问出于安全原因必须保存在本地网络上的工具。基本上,只有当你在办公室的时候,这个链接才会起作用。

我试过使用:

header("location: ''central'public'blah'test.html"); 

但是它只是将URL格式化为http://

尝试足够的前斜杠和文件://protocol:

file://///central/public/blah/test.html

(参考:http://forums.mozillazine.org/viewtopic.php?f=38& t = 908015)

try:

header("location: file://central/public/blah/test.html");

我不确定您使用的是什么浏览器,但如果您使用KDE (Konqueror),您可以使用smb://前缀,如重定向到smb://central/public/blah/test.html