Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.