Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In htaccess file, RewriteCond for one file bla.php can write so right?

 RewriteCond %{REQUEST_FILENAME} !bla.php

Question: how can write RewriteCond for multiple files? for example for 3 files: bla.php, some_bla.php,some_other_bla.php ?

share|improve this question
up vote 1 down vote accepted

In mod_rewrite you can chain more conditions - by default they are connected by logical AND but you can change in with rewritecond's switch OR like this:

RewriteCond %{REQUEST_FILENAME} !bla.php [OR]
RewriteCond %{REQUEST_FILENAME} !somebla.php
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.