【问题标题】:Keep url after redirect with wordpress使用wordpress重定向后保留网址
【发布时间】:2017-09-05 09:06:25
【问题描述】:

我正在尝试从另一个 url 重定向到一个 url 我的意思是,我有一个 url http://www.domainA/Auth/Login 并且我想重定向到 http://www.domainB/Auth/Login 但继续浏览器 http://www.domainA/Auth/Login 。我正在使用 WordPress,我通过插件迈出了第一步,但我没有获得关于保留旧网址的第二步。我该怎么做?

感谢您的支持

【问题讨论】:

  • 仅使用重定向是不可能的,您需要通过您的服务器代理请求。
  • 您可能正在寻找 mod-proxy 。 Google " mod proxy 以获取有关该指令的更多信息。
  • “我通过插件获得了第一步,但我没有获得第二步” - 如果您需要“第二步”,那么您将不得不重做第一步(不是您需要的“重定向”)。如前所述,您需要“代理”请求。

标签: php wordpress .htaccess redirect


【解决方案1】:

如果没有更改地址栏,您将无法重定向 URL。

您可以在 domainA 中 iframe DomainB。通过这种方法,您可以得到您想要的。

http://www.domainA/Auth/Login/index.html 的示例代码:

<iframe src="http://www.domainB/Auth/Login" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">
    Your browser doesn't support iframes
</iframe>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-10-23
    • 1970-01-01
    • 1970-01-01
    • 2017-04-06
    • 1970-01-01
    • 2017-04-07
    • 2014-05-28
    相关资源
    最近更新 更多