Re:Toro - a php micro-router with great examples
by solox3 on Thursday August 23, 2012 @03:06PM
(#4424267)
Reminds me of many things; as usual, the weakest part of this PHP router is the .htaccess file.
[ Parent
| on HN ]
Re:Toro - a php micro-router with great examples
by andypants on Thursday August 23, 2012 @04:05PM
(#4424535)
I don't think you can do this kind of url routing in php without modifying the .htaccess file.
Re:Toro - a php micro-router with great examples
by Karunamon on Thursday August 23, 2012 @04:52PM
(#4424777)
And so it's permanently married to Apache. Too bad.. is there anything like this that'll run on nginx/lighttpd?
Re:Toro - a php micro-router with great examples
by tlack on Thursday August 23, 2012 @05:54PM
(#4425056)
All 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;
}
Re:Toro - a php micro-router with great examples
by jasonmoo on Thursday August 23, 2012 @05:06PM
(#4424840)
I think it's pretty trivial to change the htaccess rewrite rule into an nginx/lighttpd rule.
Re:Toro - a php micro-router with great examples
by ChiperSoft on Thursday August 23, 2012 @05:12PM
(#4424877)
It's just a matter of altering your nginx configuration to rewrite requests.