将 WIX URL 重定向到另一个 URL [英] Redirecting WIX URL to another URL
问题描述
我一直在寻找相当长的时间,并尝试了在SO上找到的各种方法都无济于事.
I have been searching for quite some time, and have tried various methods found on SO to no avail.
我需要找到一种方法,使用 HTACCESS,像这样从 Wix 重定向 URL http://www.example.com/#!optician-trade/c1eh 到我指定的另一个 URL.
I need to figure out a way, using HTACCESS, to redirect URLs from Wix like this http://www.example.com/#!optician-trade/c1eh to another URL I specify.
#!在 URL 中给我带来了一些麻烦.
The #! in the URL is causing me some trouble.
推荐答案
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.
这篇关于将 WIX URL 重定向到另一个 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!