php - Access cgi-bin on cakePHP 3 folder

问题描述:

I'm making a cakePHP 3 app in which I need to have access to a cgi file in the cgi-bin folder directly. So if I type www.mysite.com/cgi-bin/myfile.cgi I should be able to see the output. The problem I'm having is with the routing, which obviously does not let me access it and instead it asks for the CgiBin controller. I know there is a way using rewrite rules, but I haven't been able to figure it out. I've tried putting the cgi-bin folder in the webroot folder and when I type www.mysite.com/cgi-bin/ I can see the folder index, but when I type www.mysite.com/cgi-bin/myfile.cgi it shows the missing controller error.