好的,所以我的 httpd.conf 上有这个重写规则
<Directory /var/www/html/dev/html5>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)/(.*)$
RewriteRule ^.*$ snapshots/playlist-%2\.html [NC,L,PT]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla(.*)MSIE\ 9.0(.*)$ [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}/dev/html5/#!/$1 [R,NC,NE,L]
RewriteRule ^.*$ index.html [NC,L,PT]
我感兴趣的是,当我在查询字符串中有 _escaped_fragment
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)/(.*)$
我想查找文件夹快照,但该文件夹不在 html5 文件夹内,是上一级的,那么我该如何查找该文件夹?像这样
RewriteRule ^.*$ ../snapshots/playlist-%2\.html [NC,L,PT]
谢谢你的帮助!