[英]NGINX Rewrite url without redirect
I have a url like this: 我有这样的网址:
http://exemple.org/Connexion.php http://exemple.org/Connexion.php
I would like to have : http://exemple.org/se_connecter.html . 我想拥有: http : //exemple.org/se_connecter.html 。 But there's no file called se_connecter.html
, I just want a rewrite, not a redirect. 但是没有名为se_connecter.html
的文件,我只想要重写,而不是重定向。
Thank you. 谢谢。
What you're asking isn't possible in HTTP. 您要的内容在HTTP中是不可能的。 You might be able to do it using a hack in javascript (eg using history.replaceState
) but I'd recommend against it. 您可能可以使用javascript中的hack(例如,使用history.replaceState
)来做到这一点,但我建议您反对使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.