开发者

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

开发者 https://www.devze.com 2023-03-28 03:00 出处:网络
I\'m wondering if it\'s possible to redirect to a URL like: \\\\central\\public\\blah\\test.html in PHP? We want to put a link on the website for employees to quickly access tools that have to be k

I'm wondering if it's possible to redirect to a URL like:

\\central\public\blah\test.html

in PHP? We want to put a link on the website for employees to quickly access tools that have to be kept on the local network for secur开发者_如何学JAVAity reasons. Basically the link would only work if you were in the office.

I've tried using:

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

but it just formats the URL to http://


Try enough forward slashes and the file:// protocol:

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

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


try:

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


I am not sure what browser you are using, but if you are using KDE (Konqueror), you can use the smb:// prefix, like redirection to smb://central/public/blah/test.html.

0

精彩评论

暂无评论...
验证码 换一张
取 消