"OR" Flag in .htaccess mod_rewrite "OR" Flag in .htaccess mod_rewrite apache apache

"OR" Flag in .htaccess mod_rewrite


from http://httpd.apache.org/docs/current/mod/mod_rewrite.html

ornext|OR (or next condition)Use this to combine rule conditions with a local OR instead of the implicit AND. Typical example:

RewriteCond %{REMOTE_HOST}  ^host1  [OR]RewriteCond %{REMOTE_HOST}  ^host2  [OR]RewriteCond %{REMOTE_HOST}  ^host3RewriteRule ...some special stuff for any of these hosts...


[OR] is used when you want to have, one OR another OR another condition, trigger the rewriterule.Otherwise the default behavior is 'AND' All of the RewriteConds have to be true in order to trigger the rule.