9

出于 SEO 的目的,我试图让一些文件可以从http://example.ca/robots.txt之类的 url 访问,但我遇到了一个奇怪的问题。这些文件可以通过 firefox 访问,但 chromium 和 google bot 无法获取这些文件!

我的路线:

# Map static resources from the /public folder to the /assets URL path
GET     /assets/*file               controllers.Assets.at(path="/public", file)

# Robots and Humans files
GET     /$file<(robots|humans).txt>             controllers.Assets.at(path="/public", file)

GET     /$file<MJ12_576CD562EFAFA1742768BA479A39BFF9.txt>                 controllers.Assets.at(path="/public", file)
4

1 回答 1

22

我不确定它是否会有所作为,但请尝试:

GET     /robots.txt             controllers.Assets.at(path="/public", file="robots.txt")
GET     /humans.txt             controllers.Assets.at(path="/public", file="humans.txt")

GET     /MJ12_576CD562EFAFA1742768BA479A39BFF9.txt                 controllers.Assets.at(path="/public", file="MJ12_576CD562EFAFA1742768BA479A39BFF9.txt")
于 2012-11-26T22:54:27.280 回答