2014-02-22 40 views
1

我目前有一个奇怪的问题。我做了一个快速网站,只想从一个页面导航到另一个页面。现在本地一切正常,但是当我将它放在Google的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 

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

+0

脚本:index.html的 - 这将需要一个Python脚本。如果您想要提供静态HTML文件,请将其配置为像您的图标。而在本地,你的意思是使用dev_appserver? – Bugs

+0

@Bugs我在yaml文件中添加了一个新的部分,就像favicon部分,我刚刚用index.html替换了favicon,但仍然存在相同的问题 – user481610

回答

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 
+1

您可能希望将所有静态html文件放在子目录中所以你可以使用通配符在你的yaml中使用一个条目,而不是每页都需要一个条目。 – Nick

相关问题