0

I've problem with editing app.yaml for simple php app has'nt directories that contains 5 files on the root

index.php    config.php    welcome.php    share.php    crossdomain.xml

my app.yaml

application: myapp
version: alpha-001
runtime: php
api_version: 1

handlers:

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

- url: /.*
script: index.php

- url: /crossdomain.xml 
  mime_type: text/xml
  static_files: static/crossdomain.xml 
  upload: static/crossdomain.xml    

it return

Unknown url handler type.

what's the right way to specify all files in app.yaml

thanx in advance

1 Answers1

1

I see two problems in the app.yaml as you show it:

  • the word script (second occurrence) is un-indented (needs two spaces before it).
  • the url regular expressions are tried in order: /.* will match any URL, so the following /crossdomain.xml handle will never trigger.

The first issue can be fixed with miniscule editing, and so can the second one -- you just need to swap the second and third handler directives.

Alex Martelli
  • 854,459
  • 170
  • 1,222
  • 1,395
  • thanx MR.Alex please your code , you mean `- url:/index.php` instead of `/.*` Sorry , i'm new to GAE platform – I Follow Mohamed Apr 03 '15 at 23:25
  • @IFollowMohamed, I mean the second `url` directive in the yaml you posted in your Q, and that is `- url: ./*`; there is no `- url: /index.php` in the yaml you posted, so of course I cannot mean that. – Alex Martelli Apr 03 '15 at 23:36