Enabling CakePHP 1.1 on Lighttpd 1.5
Somebody wrote an excellent post on how to make CakePHP work on LigHTTPD. It didn't work for me right away because for some reason mod_rewrite or my CakePHP settings are different from the "default" behavior.
Most blogs say that their URL arguments for non-tidy URLs are like this: /cakedir/index.php?url=pagename. However, for some reason my URLs are like this: /cakedir/index.php/pagename. I'm not sure why that is.
Nevertheless, you can follow the instructions in the blog post but if you have the same URL path rewrite setup as I do you will need to make a critical change to the url.rewrite-once statement:
#this is the original
url.rewrite-once = (
"^/(css|files|img|js|stats)/(.*)$" => "/$1/$2",
"^/(.*)$" => "/index.php?url=$1"
)
#change the index.php part
url.rewrite-once = (
"^/(css|files|img|js|stats)/(.*)$" => "/$1/$2",
"^/(.*)$" => "/index.php/$1"
)
Nuts!
My ISP crashed and consequently went out of business. I have moved my blog. For new articles visit blog.infoentropy.com
tags in Articles
User login
Other blogs
Recent blog posts
- Step-by-step to build a facebook app with CakePHP
- Enabling CakePHP 1.1 on Lighttpd 1.5
- Install and configure PHP5 and lighttpd on mac os x 10.4
- lighttpd as a startup item on os x
- Mac tips for Unix users
- Moving your cursor in a terminal with bash shell (Mac OS X, and Ubuntu Linux compatible)
- linux user management commands
- Setup LigHTTPD virtual hosting by hand
- Reload your hosts file in Mac
- Using MochiKit doXHR
