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

We are using Zend Framework, we switched from apache to lighttpd, main htaccess file for zend is this:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d   
RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php

What is the lighttpd equivalent of this ? I found one line here,

url.rewrite-once = (".*\.(js|ico|gif|jpg|png|css)$" => "$0", "" => "/index.php")

but it doesn't first two lines of the original (

if file and dir exists then don't



share|improve this question
up vote 1 down vote accepted

There is a open feature request but it's over 2 years old. Request: mod_rewrite check if file exists (like mod_rewrite in apache)

There is also a user commited patch available

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.