我有这个HTML:
<a href="http:/myhost.com/tiles/internal?lineGeom=(-71.1208,42.3317,-71.1052,42.3261,-71.0872,42.3354,-71.0570,42.3295,-71.0376,42.3394),(-71.1208,42.3317,-71.0754,42.3311,-71.0617,42.3428,-71.0376,42.3394),(-71.1208,42.3317,-71.0675,42.3525,-71.0376,42.3395)">live map</a>
我在浏览器中打开它,如下所示:
当我按下链接时,我直接指向:
http://localhost:63342/myhost.com/tiles/internal?lineGeom=(-71.1208,42.3317,-71.1052,42.3261,-71.0872,42.3354,-71.0570,42.3295,-71.0376,42.3394),(-71.1208,42.3317,-71.0754,42.3311,-71.0617,42.3428,-71.0376,42.3394),(-71.1208,42.3317,-71.0675,42.3525,-71.0376,42.3395)
如何更改它以指向:(新的http页面):
"http:/myhost.com/tiles/internal?lineGeom=(-71.1208,42.3317,-71.1052,42.3261,-71.0872,42.3354,-71.0570,42.3295,-71.0376,42.3394),(-71.1208,42.3317,-71.0754,42.3311,-71.0617,42.3428,-71.0376,42.3394),(-71.1208,42.3317,-71.0675,42.3525,-71.0376,42.3395)"
更新
它是如何生成“http:/”而不是“http://”?
这是我的网址构建器:
UriBuilder builder = UriBuilder
.fromPath(Constants.LIVEMAP_BASE_URL_US)
.scheme("http");
return builder.build().toString();
答案 0 :(得分:3)
您的网址似乎不正确
变化
http:/myhost.com
是
http://myhost.com
答案 1 :(得分:0)
你需要在你的网址中添加双重//:
http://myhost.com/tiles/internal?lineGeom=(-71.1208,42.3317,-71.1052,42.3261,-71.0872,42.3354,-71.0570,42.3295,-71.0376,42.3394),(-71.1208,42.3317,-71.0754,42.3311,-71.0617,42.3428,-71.0376,42.3394),(-71.1208,42.3317,-71.0675,42.3525,-71.0376,42.3395)