We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon get parameters are not working with lighttpd

this is my Lighttpd config file for phalcon

$HTTP["host"] == "www.phalcon.dev" { server.document-root = "C:\devtools\lighttpd\htdocs\phalcon\test\public" url.rewrite-if-not-file = ( "^/(.*)$" => "index.php?_url=/$1" ) }

Urls are working fine but I am unable to get the parameters after ?

www.phalcon.dev/test/mymethod - is working www.phalcon.dev/test/mymethod?var=1 - not working showing 404 error

I think there is problem in lighttpd config rewrite but I am unable to figure it out. Please Help



8.1k
Accepted
answer

this rewrite rule works

"^/([^.?]*)\?(.*)$" =>  "/index.php?_url=/$1&$2",
"^/([^.?]*)$"       =>  "/index.php?_url=/$1"

Thanks it worked !!