php - Google 在 PHP 应用引擎中未找到 Robots.txt
问题描述
Googlebot似乎robots.txt
没有找到我的文件,因为我不断收到 404 错误Stack Logger
。
我的应用程序结构如下:
/www
- index.html
- sendMessage.php
app.yaml
robots.txt
这是我的app.yaml
文件:
runtime: php55
service: default
api_version: 1
threadsafe: true
automatic_scaling:
min_idle_instances: 1
instance_class: F4_1G
handlers:
- url: /sendMessage.php
script: sendMessage.php
secure: always
- url: /
static_files: www/index.html
upload: www/index.html
secure: always
- url: /robots.txt
static_files: robots.txt
upload: robots.txt
- url: /(.*)
static_files: www/\1
upload: www/(.*)
secure: always
然后我的robots.txt
文件是:
# Rule 1
User-agent: Googlebot
Disallow: /nogooglebot/
# Rule 2
User-agent: *
Allow: /
任何帮助将不胜感激!谢谢 :)
解决方案
推荐阅读
- ios - 我应该如何正确更改 ViewController.m 的文件夹位置
- javascript - 重新路由到传递响应数据的组件
- reactjs - 反应,在动态添加的元素中渲染组件
- java - 使用 Weka 每周预测明年温度值
- ansible - 如果任务失败或主机无法访问,Ansible 如何创建 XML 文件或 exec shell 脚本
- swift - 在 Xcode 中运行 FFprobe 进程以返回文件持续时间数据
- mysql - 如何使用自动创建值向表中添加 1000 行
- java - 如何设置不同时间的多个AlarmManager
- c# - asp.net 核心发布方法、标签助手和查询字符串
- java - Android Java:按下onClick按钮时应用程序崩溃