Google app engine 100 URLMap entries limitation

前端 未结 2 1600
花落未央
花落未央 2021-01-26 03:08

I have been using google app engine to build my website, and met a problem about the maximum number of URLMap (I had 101 URLs, but the limit is 100). Here is the error message:<

相关标签:
2条回答
  • 2021-01-26 03:38

    The solution will depend on the language you are using. If you are using python 2.7, what you can do is to:

    1) Use regular expression for defining the urls, see this doc for more details

    handlers:
    - url: /(.*?)_input.html
      script: /input/\1.app
    

    2) Point a group of urls to the same app and let the app handle the different requests.

    handlers:
    - url: /(.*?)_input.html
      script: /input/input.app
    
    app = webapp2.WSGIApplication([('/a_input.html', AInputPage), ('/b_input.html', BInputPage)])
    

    From the information you provided I cant tell if a_input.html, b_html are static or not. But if they are static yo could also do:

    3) Refer them with the static file handlers, which also accept regular expressions.

    - url: /input
      static_dir: static/input
    

    See issue 1444 for some more details, specially for java related ones.

    0 讨论(0)
  • 2021-01-26 03:40

    I had the same problem using Java SDK. I revolved removing index.html from welcome-file-list. Now my entrypoint is index.jsp with a redirect to my index.html page.

    In web.xml:

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    

    In appengine-web.xml:

    <static-files>
        <include path="/fonts/**" />
        <include path="/app/fonts/**" />
        <include path="/**.html" />
        <include path="/**.js" />
        <include path="/**.css" />
        <include path="/**.ico" />
        <include path="/**.png" />
        <include path="/**.jpg" />
        <include path="/**.jpeg" />
        <include path="/**.gif" />
    </static-files>
    
    0 讨论(0)
提交回复
热议问题