且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将 WIX URL 重定向到另一个 URL

更新时间:2021-11-10 22:25:53

URL 的哈希部分仅具有客户端意义,甚至不会被普通浏览器发送到服务器......所以你不能基于它在服务器端重写,因为你的服务器永远不会看到它.

The hash part of a URL is of client-side meaning only, and is not even send to the server by common browsers … so you can not rewrite based on it server-side, because your server never gets to see it.

如果你想根据hash重定向,你需要通过JS在客户端进行.

If you want to redirect based on the hash, you need to do it client-side via JS.