Apache 2.4.7重写规则
我有以下Apache url重写规则Apache 2.4.7重写规则,apache,.htaccess,mod-rewrite,seo,Apache,.htaccess,Mod Rewrite,Seo,我有以下Apache url重写规则 RewriteEngine On RewriteCond %{REQUEST_URI} ^/$ RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)$ RewriteRule ^(.*)$ /snapshots/%1? [NC,L] [来源:] 这些URL在升级到Apache2.4.7之前起作用。(我不确定我有哪个版本)。现在,当在查询字符串中使用?\u转义\u片段=/时,它总是加载主页。有人知道如
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)$
RewriteRule ^(.*)$ /snapshots/%1? [NC,L]
[来源:]
这些URL在升级到Apache2.4.7之前起作用。(我不确定我有哪个版本)。现在,当在查询字符串中使用?\u转义\u片段=/
时,它总是加载主页。有人知道如何修复Apache2.4.7吗
更新
目录结构
/.htaccess
/index.php
/partials/
/snapshots/
/css/
/js/
在Apache 2.4+中尝试此规则:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)$
RewriteRule ^/?$ /snapshots/%1? [L,QSD]
QSD
将在重定向后丢弃查询字符串。抱歉,您的回答没有成功。您实际上是如何验证它不起作用的?另外,如果您提供完整的.htaccess,可能会有一些冲突的规则。