4 ms·
Reminds me of many things; as usual, the weakest part of this PHP router is the .htaccess file.
by solox3 14y ago
Reminds me of many things; as usual, the weakest part of this PHP router is the .htaccess file.
- andypants 14y agoI don't think you can do this kind of url routing in php without modifying the .htaccess file.
- Karunamon 14y agoAnd so it's permanently married to Apache. Too bad.. is there anything like this that'll run on nginx/lighttpd?
- ChiperSoft 14y agoIt's just a matter of altering your nginx configuration to rewrite requests. https://gist.github.com/3441804 https://gist.github.com/3441804
- jasonmoo 14y agoI think it's pretty trivial to change the htaccess rewrite rule into an nginx/lighttpd rule.
- memnips 14y agoIn lighttpd, enable mod rewrite and: url.rewrite-once = ( "^/(.*)$" => "index.php/$1" )
- tlack 14y agoAll of these routers work under Nginx or Lighttpd, they just need a different config file. Here's one that is often used under Nginx: location { root /usr/share/nginx/html; index index.php index.html index.htm; try_files $uri $uri/ /index.php?$request_uri; }