Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d   
RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php

This is Zend htaccess, I can't seem to find a lighttpd equivalent of this..

Thanks, D

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

I'm pasting the solution we found and the url were we found it, in case we need it in the future and for the benefit of other people reading this post.

So this is a neat trick that does work on the lighttpd rewrite system.

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

http://smartycode.com/performance/zend-framework-application-lighten-the-load-server/

share|improve this answer
    
yet we haven't found the solution for first two lines RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d –  Devrim Sep 13 '09 at 15:53
    
oh the following solves the problem for us, doesn't it? url.rewrite = ( "^/(.*)\.(.+)$" => "$0", "^/(.+)/?$" => "/index.php/$1" ) courtesy of: guyrutenberg.com/2008/05/24/… –  A4A Sep 14 '09 at 16:15
    
nope :) unfortunately it doesn't –  Devrim Sep 14 '09 at 23:10
add comment

yet we haven't found the solution for first two lines RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d

lighty has no solution for it and it seems there won't be any

review http://redmine.lighttpd.net/issues/985

there is a patch

share|improve this answer
add comment

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.