Reputation: 357
I am new to google app engine. Need support clear some process of doing: 1. First Question: I have create a simple app to test tutorials provided by the google. I need to clarify the way I did was correct.
Following is the way I implement: app.yaml:
application: praveenhellogapp
version: 1
runtime: php
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: /stylesheets
static_dir: stylesheets
- url: /(.+\.php)$
script: \1
- url: /googletutorials/
script: googletutorials/linkstaticfile.php
- url: .*
script: linkstopages.php
you can check the output I deploy to the GAE cloud: http://praveenhellogapp.appspot.com/
I do not understand the script: \1 concept clear. what is the use of doing script: \1 "url: /(.+.php)$ script: \1"
Upvotes: 1
Views: 73
Reputation: 1412
The order of the handlers matters, so your 3rd rule, i.e. /(.+.php)$ takes precedence over the 4th and 5th. As for the regex syntax, see http://en.wikipedia.org/wiki/Regular_expression for more details. The \1 represents whatever is matched in the URL. In other words, a request to /foo.php will invoke the script foo.php in your app folder.
Upvotes: 1