我遵循这个堆栈溢出线程中的说明,在Windows 7中创建一个自定义协议处理程序,该处理程序将打开Internet中任何前缀为"ie:“的URL。正如自定义协议处理程序在Microsofts员额中解释的那样,如何处理特殊字符存在问题,因此使用URL传递参数存在问题。
在链式螺纹中,Saurabh发布了一篇文章,建议使用脚本创建本地html文件,该脚本可以正确地解析URL,然后重定向到这个新更新的URL。我还没把这个弄到手。
什么起作用:
<html>
<head>
<title>
IE Redirect
</title>
<script>
function testOpenURL(){
window.open('https://www.google.se/search?q=stackoverflow', '_self');
}
</script>
</head>
<body onload="testOpenURL()">
</body>
</html>
问题:
任何建议都是非常感谢的。您可以在下面找到我的reg文件。
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\ie]
"URL Protocol"="\"\""
@="\"URL:IE Protocol\""
[HKEY_CURRENT_USER\Software\Classes\ie\DefaultIcon]
@="\"iexplore.exe,1\""
[HKEY_CURRENT_USER\Software\Classes\ie\shell]
[HKEY_CURRENT_USER\Software\Classes\ie\shell\open]
[HKEY_CURRENT_USER\Software\Classes\ie\shell\open\command]
@="cmd /C set myvar=%1 & call set myvar=%%myvar:ie:=%% & call start /separate iexplore %%myvar%% & exit"
发布于 2021-04-15 11:40:40
修改命令字符串vaue上的协议sufix也失败了,因此我得到了解决此问题的另一种方法:
http: //<your.domain>/redirect/index.php)上创建如下页面:<?php
$url = isset($_GET['url']) ? $_GET['url'] : die('Access denied');
$url = str_replace('ie', 'http', $url);
header('Location: ' . $url);
die();
?>command键值设置为"iexplore.exe" "http://<your.domain>/redirect?url=%1"https://stackoverflow.com/questions/51521030
复制相似问题