I am using gcp app engine (for the first time), I am used to only normal servers. I have a php script that have 2 files (1-index.php 2- action.php ). I created a app.yaml according to gcp :
runtime: php72 # Replace with php73 to use the PHP 7.3 runtime
handlers:
# Serve a directory as a static resource.
- url: /.*
script: auto
- url: /action.php
script: auto
When I deployed the app the 3 files were uploaded the 2 php and app.yaml. I can access the index file but when i wanna access action.php it shows index content. What am I doing wrong ?
The order of the handlers in the
app.yamlmatters - the first pattern match wins.Your first pattern is the catch-all
- url: /.*- it will match anything so that handler will get every request.Swap your handlers' order.