.htaccess 未重定向到 ?_escaped_fragment_=
我想将请求“index.php?_escaped_fragment_=about
”重定向到“snapshots/snap_about.html
” 但我无法让它工作:(
这是一个 AJAX 站点;当我尝试请求 example.com/index.php?_escaped_fragment_=about
时收到的 URL 是:
example.com/index.php?_escaped_fragment_=about#!about
这是我的
redirect index.php?_escaped_fragment_=about http://www.example.com/snapshots/snap_about.html
redirect /testx.html http://example.com/dummytest/index.html
htaccess重定向/testx.html 有效。
也许我犯了一个很大的错误,但我是新手!
I want to redirect the request "index.php?_escaped_fragment_=about
" to "snapshots/snap_about.html
"
but I can't get it to work :(
It's an AJAX site; the URL I receive when I try to request example.com/index.php?_escaped_fragment_=about
is:
example.com/index.php?_escaped_fragment_=about#!about
This is my htaccess
redirect index.php?_escaped_fragment_=about http://www.example.com/snapshots/snap_about.html
redirect /testx.html http://example.com/dummytest/index.html
The redirect /testx.html works.
Maybe I am making a big big mistake, but I am new at this!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可能会使用 RewriteRule 来做到这一点。这是一次性的,还是可以应用于其他 URL 的通用模式?例如你还想要吗
index.php?_escaped_fragment_=blah
重定向到snapshots/snap_blah.html
?如果不是,类似这样:
如果是,类似这样:
I'd probably do this using a RewriteRule. Is this a one-off, or is it a general pattern that could be applied to other URLs? e.g. would you also want
index.php?_escaped_fragment_=blah
to redirect tosnapshots/snap_blah.html
?If not, something like this:
If yes, something like: