Ajax .htaccess未重定向到?\u转义\u片段_=

Ajax .htaccess未重定向到?\u转义\u片段_=,ajax,.htaccess,redirect,Ajax,.htaccess,Redirect,我想将请求“index.php?\u转义\u片段\u=about”重定向到“快照/snap\u about.html” 但我无法让它工作:( 这是一个AJAX站点;当我尝试请求example.com/index.php?\u expaired\u fragment\u=about时收到的URL是: example.com/index.php?_escaped_fragment_=about#!about 这是我的访问权限 redirect index.php?_escaped_fragment

我想将请求“
index.php?\u转义\u片段\u=about
”重定向到“
快照/snap\u about.html
” 但我无法让它工作:(

这是一个AJAX站点;当我尝试请求
example.com/index.php?\u expaired\u fragment\u=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
重定向/testx.html有效


也许我犯了一个很大的错误,但我在这方面是新手!

我可能会使用重写规则来执行此操作。这是一次性的,还是可以应用于其他URL的通用模式?例如,您是否也希望
index.php?\u转义\u fragment\blah
重定向到
快照/snap\u blah.html

如果不是,则类似如下:

RewriteRule index\.php\?_escaped_fragment_=about  snapshots/snap_about.html [NC,R=301]
如果是,则类似于:

RewriteRule index\.php\?_escaped_fragment_=(.*)  snapshots/snap_$1.html [NC,R=301]

您是否有可以处理转义的_片段请求的索引代码?您可以在文档中使用PHP头进行301重定向