2014-02-22 62 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

相關問題