I have this .htaccess

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

How can I convert it to run my website through Lighttpd ?

Thank you so much!

link|improve this question
I think it's not possible without mod-magnet. But maybe someone can prove me wrong. Anyway, this is more for serverfault or superuser. – STATUS_ACCESS_DENIED Apr 22 '11 at 13:13
feedback

migrated from stackoverflow.com Apr 23 '11 at 22:53

This question came from our site for professional and enthusiast programmers.

1 Answer

You should be able to use:

url.rewrite-if-not-file => ( ".*" => "/index.php" )

Make sure to enable mod_rewrite in lighttpd.conf and reload lighty.

url.rewrite-[repeat-]if-not-file New: For the 1.4.x branch as of 1.4.24 or r2647 from svn:

Rewrites a set of URLs internally in the webserver BEFORE they are handled and checks that files do not exist.

Take examples from above, this is to mimic Apache“s "!-f" RewriteRule. Please note this does not work for directories, pipes, sockets or alike.

Where do I want to use this? Maybe with e.g. Drupal backend, where mod_magnet (has an Apache“s -f and -d solution) might not be handy or simply "too much" for just this kind of rewrites.

link|improve this answer
Thank you!!!! works – Damiano Apr 22 '11 at 16:16
feedback

Your Answer

 
or
required, but never shown