【问题标题】:NGINX Rewrite url without redirectNGINX 重写 url 没有重定向
【发布时间】:2018-03-28 14:30:18
【问题描述】:


我有一个这样的网址:

http://exemple.org/Connexion.php

我想要: http://exemple.org/se_connecter.html。 但是没有名为se_connecter.html 的文件,我只想要重写,而不是重定向。

谢谢。

【问题讨论】:

  • 你的问题不太清楚。您希望用户更改浏览器中的地址而不将他们重定向到新地址,还是希望在http://exemple.org/Connexion.php 上显示名为se_connected.html 的文件的内容?
  • 我希望用户更改浏览器中的地址,而不会将他们重定向到新地址。

标签: php nginx url-rewriting


【解决方案1】:

您的要求在 HTTP 中是不可能的。您可能可以使用 javascript 中的 hack(例如使用 history.replaceState)来做到这一点,但我建议您不要这样做。

【讨论】:

    猜你喜欢
    • 2017-07-05
    • 2016-04-29
    • 1970-01-01
    • 1970-01-01
    • 2017-04-24
    • 2018-11-11
    • 2014-08-08
    • 2015-07-28
    • 1970-01-01
    相关资源
    最近更新 更多