gab*_*aam 29 apache .htaccess mod-rewrite rewrite apache2
刚发现这个.htaccess重写代码
RewriteEngine on
RewriteCond %{HTTP_HOST} ^my.domain.com$ [NC,OR]
RewriteCond %{REQUEST_URI} !public/
RewriteRule (.*) /public/$1 [L]
Run Code Online (Sandbox Code Playgroud)
我想知道"OR"标志的目的是什么.已经检查了文档http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriteflags但是可以找到任何信息.
有任何想法吗?
war*_*ker 63
来自http://httpd.apache.org/docs/current/mod/mod_rewrite.html
ornext|OR(或下一个条件)使用此选项将规则条件与本地OR组合而不是隐式AND.典型例子:
RewriteCond %{REMOTE_HOST} ^host1 [OR]
RewriteCond %{REMOTE_HOST} ^host2 [OR]
RewriteCond %{REMOTE_HOST} ^host3
RewriteRule ...some special stuff for any of these hosts...
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
42529 次 |
| 最近记录: |