I am migrating an over loaded server from apache2 to lighttpd, currently I am proxying all the static resources from the lighttpd server but that still doesn't fix the load problems.
I want to migrate everything to lighttpd but I've run into a problem.
Apache2 has multiviews functionality to clean up URLs which lighttpd doesn't.
I found the following code to do it in lighttpd
url.rewrite-if-not-file = ( "^([^?]*)(\?.*)?$" => "$1.php$2" )
It works but it has two problems
1: website.com/ returns 404, I guess its trying to find /.php
2: website.com/user/Username also returns 404 (Its supposed to find user.php, then the php script does the rest by looking at $_SERVER['REQUEST_URI'])
How do I rewrite the code to fix these problems?