Add crossdomain.xml to app.yaml file for simple PHP app

4 views
Skip to first unread message

I Follow Mohamed via StackOverflow

unread,
Apr 3, 2015, 6:55:12 PM4/3/15
to google-appengin...@googlegroups.com

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



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/29440710/add-crossdomain-xml-to-app-yaml-file-for-simple-php-app

Alex Martelli via StackOverflow

unread,
Apr 3, 2015, 7:00:12 PM4/3/15
to google-appengin...@googlegroups.com

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.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/29440710/add-crossdomain-xml-to-app-yaml-file-for-simple-php-app/29440797#29440797
Reply all
Reply to author
Forward
0 new messages