RewriteRule
RewriteRuleのパターンは、Directoryディレクティブ内にあると、stripされる。たとえば、
<Directory "/home/foobar/public_html/rewrite/"> RewriteEngine on RewriteCond %{REQUEST_URI} ^/~foobar/rewrite/test/?$ RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5\.0.*Firefox/[0-9\.]+$ RewriteRule ^test/?$ /~foobar/rewrite/index.html [R,L] </Directory>
のように、REQUEST_URIが /~foobar/rewrite/test/ であったとしても、RewriteRuleのパターンは、^test/?$とする必要がある。RewriteLogを取ってみてよくわかった。
でも http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html には、ちゃんと書いていないような。。。
Pattern is a perl compatible regular expression, which is applied to the current URL. ``Current'' means the value of the URL when this rule is applied. This may not be the originally requested URL, which may already have matched a previous rule, and have been altered.
他のRewriteRuleの影響があるというのはわかるのだが、Directoryのstripまではわからないぞ。