I’m new to google app engine and I’m trying to configure my app.yaml file for a web application which utilizes php and ajax. I’ve got the application running in the PHP SDK using the following yaml file:
application: foobar
version: 1
runtime: php
api_version: 1
handlers:
- url: /stylesheets
static_dir: stylesheets
- url: /
script: index.php
- url: /ajax.php
script: ajax.php
- url: /index.*
script: index.php
- url: /about.*
script: about.php
- url: /terms.*
script: terms.php
- url: /contact.*
script: contact.php
- url: /update.*
script: update.php
login: required
secure: always
- url: /login.*
script: login.php
login: required
secure: always
- url: /.*
script: index.php
Although this is fundamentally working I’ve got a feeling I’m doing something wrong because I don’t really want to provide access to ajax.php since it is purely for ajax processing. When I type ‘ajax.php’ into the browser in IE9 I’m prompted to open or save ‘ajax.js’, which contains processing code from the ajax file. In other browsers the same code is dumped directly onto the webpage.
How can I allow ‘ajax.php’ file to be accessed by ‘index.php’ but avoid this issue?