0

I have deployed a PHP project in Google App Engine as Flexible Environment, what I want is to have a custom URL so the user can press

www.example.com/user

must point to

www.example.com/core/userProfile/user.php

I have changed the app.yaml to be this, but I can't get it to work

runtime: php
env: flex
service: api 
api_version: 1
threadsafe: true

resources:
  cpu: 1
  memory_gb: 1
  disk_size_gb: 10

# Starting Point
runtime_config:
  document_root: '.'

# Routers
handlers:
- url: /test.php
  script: /test.php

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

- url: /user
  script: core/userProfile/user.php

any url gives the following result

Error: Not Found
The requested URL /user was not found on this server.
Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
Hamzeh Hirzallah
  • 263
  • 2
  • 17

1 Answers1

0

Your app.yaml configuration is mixing up the standard environment Handlers element into a flexible environment configuration, so it is probably ignored. Somehow related: How to tell if a Google App Engine documentation page applies to the standard or the flexible environment

You need to handle the URL routing inside your flex application, see the Quickstart for PHP in the App Engine Flexible Environment

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97