shpasspass
V2EX  ›  问与答

求教如何把其他网站始终在自己的域名下访问,类似iframe功能

  •  
  •   shpasspass · Aug 13, 2013 · 2659 views
    This topic created in 4669 days ago, the information mentioned may be changed or developed.
    如果html里写这个的话<iframe src="http://www.163.com/" ></iframe>
    只有首页能在iframe里,而点击里面的链接,就会跳转到原始网页了,不在iframe里了。。。求教如何才能始终在iframe里显示其他网站呢?

    比如wopus里的主题演示功能,就可以让演示主题始终在wopus的域名下。
    原始网址http://themes.wopus.org/wpthemes/picture-theme/5122.html
    始终在iframe下的网址http://themes.wopus.org/wpthemes/picture-theme/5122.html
    1 replies    1970-01-01 08:00:00 +08:00
    ejin
        1
    ejin  
       Aug 13, 2013
    楼主请自行了解下反向代理,另外反代的时候要替换下内容,不然有些链接还是要出错。

    反向代理可以用nginx实现,或者php,当然python也可以。

    没有更简单的了,别想着html代码能搞定,别想着js代码能搞定
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4146 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 00:17 · PVG 08:17 · LAX 17:17 · JFK 20:17
    ♥ Do have faith in what you're doing.