Lighttpd mod_rewrite conversion from .htaccess format
- by hoball
Hello,
I am using lighttpd as webserver and is having an issue about mod_rewrite.
Currently I have a set of Apache .htaccess rewrite rules from a PHP script:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php [QSA,L]
In my understanding, if the requested URI is not a file/directory/sym-link,
append it to index.php
eg. www.a.com/hello/world --> www.a.com/index.php/hello/world
I attempted to convert to lighttpd specification:
url.rewrite-if-not-file = ( "^(.*)$" = "index.php/$1" )
However, it doesn't work. I suspect that is due to misuse of $1. I tried to use $0/%0 or something else but they fail.
Would you please provide me a hint on making the syntax work?
Thank you!