7

एसईओ उद्देश्य के लिए, मैं कुछ फ़ाइलों को यूआरएल से http://example.ca/robots.txt तक पहुंचाने की कोशिश कर रहा हूं लेकिन मुझे एक अजीब मुद्दे का सामना करना पड़ रहा है। फाइल फ़ायरफ़ॉक्स के साथ सुलभ हैं लेकिन क्रोमियम और Google बॉट उन फ़ाइलों को नहीं मिल सकते हैं!नाटक में स्थिर फ़ाइल में रूटिंग! फ्रेमवर्क 2.0

मेरी मार्गों:

# 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) 
+0

क्या आप 404 त्रुटियां मिलेंगी? क्या आप सुनिश्चित हैं कि कुछ कैश नहीं किया जा रहा है जिससे इसका कारण होगा? –

+1

एक और प्रश्न की तलाश करें, जहां क्रोम अजीब चीजें बनाता है :) http://stackoverflow.com/a/13103936/1066240 Thanx से @Schleichardt मैंने इसे फेविकॉन जोड़कर हल किया, 'ऑनरक्वेट' के साथ जांचें कि क्या होता है। – biesior

+0

मैं खाली फ़ाइल के साथ परीक्षण कर रहा था और लगता है जैसे क्रोम खाली फ़ाइल को टूटी हुई लिंक के रूप में मानता है ... – Mooh

उत्तर

19

मुझे यकीन है कि अगर यह एक फर्क नहीं हूँ, लेकिन कोशिश:

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") 
+0

इसे 'favicon.ico' के लिए भी उपयोग करें। मैं इसे यहां Google खोजों के लिए डाल रहा हूं। – raisercostin