CakePHP under Lighttpd
By Rayed
After moving alriyadh.com to Lighttpd I had some problem making a CakePHP application I wrote to work properly.
I searched the net for a solution and I found this post, but unfortunately the solution they proposed didn’t work, I spent several hours trying to make it work until I gave up, I decide to do it from scratch and luckily it worked.
The mod_rewrite rules I used in lighttpd.conf file:
url.rewrite-once = (
"^/cake/(css|files|img|js|stats)/(.*)$" => "/cake/app/webroot/$1/$2",
"^/cake/(.*)$" => "/cake/app/webroot/index.php?url=$1"
)
Where cake is you cakePHP application.
I tried to login and add a comment to the CakePHP Bakery site, but I got an error when I try to comment!