CodeIgniter routing in Google App Engine

2019-09-07 21:37发布

问题:

After some hard work getting CI to work initially in App Engine, I am struggling when it comes to routes.

My index controller works, as do any controllers that are in the root controller folder.

However, anything that is inside a folder e.g. controllers/admin/index.php doesn't work.

Running on a LAMP stack, this would work fine, without any extra routing.

Do I need to add a new route, and if so, what should it be?

Or do I need to add in a handler in the app.yaml file, again, if so, what should it be?

My app.yaml file at the moment looks like this:

application: <project-name>
version: 1
runtime: php
api_version: 1
threadsafe: false

handlers:
- url: /.*
  script: index.php

And this works (well, I can access the main index controller and other top level controller scripts (controllers/index.php, controllers/page.php etc))