Rewrite rule if condition is not matched
How may I perform a rule if the URL is NOT matching the path “forums”? For example: RewriteCond IF URL IS NOT forums RewriteRule !\.(js|gif|css|jpg|png)$ %{DOCUMENT_ROOT}/index.php [L] Answer Apache’s RewriteCond as well as the RewriteRule directive support the exclamation mark to specify a non-matching pattern: You can prefix the pattern string with a ‘!’ character … Read more