2014-01-14 8 views
2

나는 앱 엔진에서 임시로 호스팅하고있는 웹 사이트를 만들었습니다. 내 컴퓨터에서 HTML 파일을 열면 페이지를 탐색 할 수 있습니다. 내가 http://www.alshafarconstruction.appspot.com/index.html로 향하면 실패합니다.요청한 URL을 서버 오류에서 찾을 수 없음

오류 메시지 :

Error: Not Found 

The requested URL /contact.html was not found on this server 

애플리케이션 제목 :

application: alshafarnew 
version: 1 
runtime: python 
api_version: 1 

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

- url: /(.*\.html) 
    static_files: \1 
    upload: index.html 

- url: /.* 
    script: main.py 

main.py : 나는 dashb을 확인했습니다

from google.appengine.ext import webapp 
from google.appengine.ext.webapp.util import run_wsgi_app 

class IndexHandler(webapp.RequestHandler): 
    def get(self): 
     if self.request.url.endswith('/'): 
      path = '%sindex.html'%self.request.url 

     self.redirect(path) 

    def post(self): 
     self.get() 

application = webapp.WSGIApplication([('/.*', IndexHandler)], debug=True) 

def main(): 
    run_wsgi_app(application) 

if __name__ == "__main__": 
    main() 

oard를 찾아 HTML 파일이 있는지 확인하십시오. 나는 웹 사이트 배포 및 디자인에 익숙하지 않다. 누구든지 가능한 오류를 제안 할 수 있습니까? 이미 여러 사이트를 방문하여 해결책을 찾았습니다.

+0

대시 보드에는 이전 버전이 있습니까? 'contact.html' 페이지에 대한 ew 링크? 클릭하면 URL은 무엇입니까? –

+0

라우팅 등을 관리하는 것으로 app.yaml을 붙여 넣을 수 있습니다. –

+0

@PaulCollingwood가 내 질문에 대한 업데이트로 aslso를 게시했습니다. –

답변

1

The documentation 정적 및 응용 프로그램 파일이 별도로 업로드되므로 파일이있을 수 있지만 응용 프로그램 파일 부분에 파일이 업로드되고있는 것일 수 있습니다.

당신은 현재 index.html 업로드에 알리는 upload 지침이 있습니다

- url: /(.*\.html) 
    static_files: \1 
    upload: index.html 

(그것은 또한 업로드 할 수 있도록이 존재한다면 실제로는 정규 표현식 예를 [email protected]를 들어,의)
이를 정규 표현식을 모든 HTML 파일과 일치 시키려면 다음과 같이하십시오.

- url: /(.*\.html) 
    static_files: \1 
    upload: .*\.html 
+0

당신이 아래에 부여한 코드로 앱 파일을 변경해야한다는 것을 의미합니까? –

+0

@sreenathsreenath : 예; HTML 파일에 해당하는 부분이'. * \ .html'의'upload' 속성을 갖도록'app.yaml'을 변경할 필요가 있습니다. – icktoofay

+0

지옥에서 저를 구해 주셔서 감사합니다. –

관련 문제