标签超链接无法在应用引擎上运行

时间:2014-02-22 10:22:03

标签: html google-app-engine

我目前遇到了一个奇怪的问题。我已经建立了一个快速的网站,只想从一个页面导航到另一个页面。现在本地一切正常,但当我把它放在谷歌的App Engine上时,我的链接就会导航到索引页面。我不确定为什么......

HTML:

<div style="width:90%;margin:auto;left:0;right:0;">
        <center>
            <div class="btn-group">
                  <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
                    Phase 1 <span class="caret"></span>
                  </button>
                  <ul class="dropdown-menu">
                    <li><a href="Phase1Before.html">Phase 1: Before Task</a></li>
                    <li><a href="Phase1After.html">Phase 1:  After Task</a></li>
                    <li class="divider"></li>
                    <li><a href="RemarksPhase1.html">Phase 1:  Remarks</a></li>
                    <li class="divider"></li>
                  </ul>
            </div>

            <div class="btn-group">
                  <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
                    Phase 2 <span class="caret"></span>
                  </button>
                  <ul class="dropdown-menu">
                    <li><a href="Phase2Before.html">Phase 2: Before Task</a></li>
                    <li><a href="#">Phase 2:After Task</a></li>
                    <li class="divider"></li>
                    <li><a href="#">Phase 2:Remarks</a></li>
                    <li class="divider"></li>
                  </ul>
            </div>
        </center>
    </div>

文件夹结构:

enter image description here

的app.yaml:

application: appname-irm
version: 1
runtime: php
api_version: 1
threadsafe: false

handlers:
- url: /static
  static_dir: static
  expiration: 30d

- url: /(.*\.(gif|png|jpg|ico|js|css|ttf))
  static_files: \1
  upload: (.*\.(gif|png|jpg|ico|js|css|ttf))

- url: /favicon.ico
  static_files: static/favicon.ico
  upload: static/favicon.ico
  expiration: 30d

- url: .*
  script: index.html

我不确定为什么这不适用于app引擎

1 个答案:

答案 0 :(得分:0)

问题出在我的yaml文件中,只需在应用中为每个页面添加一个部分:

application: myapp
version: 1
runtime: php
api_version: 1
threadsafe: false

handlers:
- url: /static
  static_dir: static
  expiration: 30d

- url: /(.*\.(gif|png|jpg|ico|js|css|ttf))
  static_files: \1
  upload: (.*\.(gif|png|jpg|ico|js|css|ttf))

- url: /favicon.ico
  static_files: static/favicon.ico
  upload: static/favicon.ico

- url: /phase1after.html
  static_files: phase1after.html
  upload: phase1after.html

- url: /phase1before.html
  static_files: phase1before.html
  upload: phase1before.html

- url: /phase2before.html
  static_files: phase2before.html
  upload: phase2before.html

- url: /remarksphase1.html
  static_files: remarksphase1.html
  upload: remarksphase1.html

- url: .*
  script: index.html