favicon.ico “not found error” in app engine

匿名 (未验证) 提交于 2019-12-03 01:40:02

问题:

I am tryin to develop on app engine and in the list of the errors displayed in the admin console I always see

/favicon.ico

i read the documentation , added a new folder called static and added this in my app.yaml

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

but even now i a getting the same error...

回答1:

This entry should be placed before the entry for the main handler, like:

- url: /favicon.ico   static_files: media/img/favicon.ico   upload: media/img/favicon.ico  - url: /robots.txt   static_files: media/robots.txt   upload: media/robots.txt  - url: .*   script: main.py 

The entries are processed in order of apperance and first one that matches wins.



回答2:

If you are doing this in Java, I got rid of the error by putting a blank "favicon.ico" file in the "war" directory.

If you want to make your own quick and ugly "favicon.ico" file, this website was super easy to use: http://www.favicon.cc/



回答3:

For your application, favicon.ico should be a static image. You can upload a favicon.ico file with your application, and in your app.yaml file configure your application to serve the image when the url /favicon.ico is requested. Below is an example entry in your app.yaml file for /favicon.ico. We assume you include the favicon.ico file in the directory path static/images:

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

is written here



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!