<IfModule mod_rewrite.c> RewriteEngine On RewriteLog "/private/var/log/apache2/rewrite.log" RewriteLogLevel 3 RewriteCond %{REQUEST_URI} !^/etc$ [OR] RewriteCond %{REQUEST_URI} !^/libs$ [OR] RewriteCond %{REQUEST_URI} !^/bin$ [OR] RewriteCond %{REQUEST_URI} !^/home$ [OR] RewriteCond %{REQUEST_URI} !^/var$ [OR] RewriteCond %{REQUEST_URI} !^/content$ [OR] RewriteCond %{REQUEST_URI} !^/siteadmin$ RewriteRule ^/([^/]*)/([^/]*)/(.*)$ /content/wu/$2_$1/$3 [PT,L] </IfModule>
使用[OR]与多个“不”(!)模式意味着每个URL都将匹配一个RewriteCond。
例子:
您可能打算使用默认的AND行为。 你想要的path不是/ etc和/ libs和/ bin和/ home等