Curvegraph
Curvegraph

Reputation: 1080

Google cloud storage - API not working it shows index.php only

I am an Android developer. I created a PHP API to communicate with my Android project. It works well in Godaddy. I want to move it to Google Cloud service. I deployed the PHP project, but it shows only the index page of my domain. It doesn't show any other PHP files. Can anyone help me ?

Do I need to add more in this app.yaml File?

runtime: php55
    api_version: 1
    threadsafe: yes

    runtime_config:
        document_root: ipltrivia
    handlers:
    - url: .*
      script: index.php

Upvotes: 1

Views: 360

Answers (1)

Mangu
Mangu

Reputation: 3325

You only have one default handler in your app.yaml, and said handler only shows the index.php file.

You can serve other PHP scripts adding another handlers, like in here:

- url: /(.+\.php)$
  script: \1

If you also need a default handler for an empty/not recognised path, you can always add:

- url: /
  script: index.php

Upvotes: 1

Related Questions