doudang4568 2015-10-28 16:38
浏览 424

内部链接 - 跳转到链接 - 从https到http问题

I did a home-page in php (which can be seen only on https) that page relinks to 2 different internal webportal. One of the two internal webportal (MpcPanel) is on a http url.

example: home-page url: https://192.168.1.100

html code of the home-page that does not link to the correct wepportal (MpcPanel):

  <div align="center" class="copyright" style="width: 400px; border: thin solid #F48C13; margin:0 auto;">
    <p><a href="/cgi-bin/class/login.cgi"><strong>Accesso a MpcPanel</strong></a></p>
  <p><a href="/cgi-bin/class/login.cgi"><img src="/classpba/include/images/logo.png" alt="" width="240" height="50" longdesc="/classpba/include/images/logo.png" /></a></p>

The full url I want to go is: http://192.168.1.100/cgi-bin/class/login.cgi

And the full url of the image is: http://192.168.1.100/classpba/include/images/logo.png

I dont want to put in the src= the full url becouse, I want the opportunity to change the IP of my server without having to be forced to manually change also the IP in the home-page.

  • 写回答

1条回答 默认 最新

  • drzdu44226 2015-10-28 16:52
    关注

    You can't. Once you are in a server in HTTPS, any relative links ("/img/logo.png") will go trough the same protocol to the same server. If you want to change the protocol you have to supply the full URL there.

    What you could do it's create a relay page, creating on the "https" server the page /img/logo.png, which is a program that connects to another server, picks the image and displays it.

    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置