about:blank#blocked on< a href =" file:///XXX"> Link</a>(降价页面) [英] about:blank#blocked on <a href="file:///XXX">Link</a> (Markdown Page)
问题描述
在Markdown页面中(Microsoft TFS Wiki)
我尝试为 file
链接创建一个标签:
In a Markdown Page (Microsoft TFS Wiki)
I try crate A tag for file
link:
<a href="file:///C:/temp\file.txt">file.txt</a>
点击(Chrome),我得到
On click (Chrome), I got
about:blank#blocked
推荐答案
与协议 file:无关的Chrome特定问题,Opera和Firefox也会显示空白页.当我想在本地主机上浏览HTML文件时,必须通过协议 http:访问它们.例如,当我想在Chrome中看到 C:\ temp \ file.html
时,我将在本地Apache主机中创建一个虚拟目录:
It's not a Chrome-specific issue with protocol file:, Opera and Firefox display blank page too.
When I want to browse HTML files on my localhost, I have to access them via protocol http: instead.
For instance when I want to see C:\temp\file.html
in Chrome, I will make a virtual directory in my local Apache host:
<VirtualHost *:80>
DocumentRoot C:/temp
ServerName temp.localhost
</VirtualHost>
并将此行添加到%SystemRoot%\ System32 \ drivers \ etc \ hosts
127.0.0.1 temp.localhost
现在,我可以在浏览器中的URL http://temp.localhost/file中看到该文件.html
Now I can see the file in browsers at URL http://temp.localhost/file.html
这篇关于about:blank#blocked on< a href =" file:///XXX"> Link</a>(降价页面)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!