简体   繁体   中英

Configuring app.yaml for AppEngine

I'd like to configure my site as follows for SEO purposes:

site.com       -> main.php
site.com/X     -> script1.php
site.com/*     -> script2.php
site.com/*/*   -> script2.php
site.com/*/*/* -> script2.php

where * is any value apart from X.

How do I set up my app.yaml so that this works. I've tried the below but it doesn't work.

- url: /X.php
  script: script1.php

- url: /*/*
  script: script2.php

- url: .*
  script: main.php

Thanks

The solution I've found is:

- url: /X
  script: script1.php

- url: /X\/.*
  script: script2.php

- url: .*
  script: main.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM