我使用robots.text中的以下文本,它驻留在我的网站的根目前隐藏view.php从谷歌。防止谷歌(搜索引擎)索引我的codeigniter网站的具体视图
User-agent: *
Disallow: /application/views/view.php
我在做它正确的或我必须写控制器路径类似以下
User-agent: *
Disallow: /index.php/mycontroller/function
我使用robots.text中的以下文本,它驻留在我的网站的根目前隐藏view.php从谷歌。防止谷歌(搜索引擎)索引我的codeigniter网站的具体视图
User-agent: *
Disallow: /application/views/view.php
我在做它正确的或我必须写控制器路径类似以下
User-agent: *
Disallow: /index.php/mycontroller/function
您需要引用URL,而不是文件路径。所以你的情况正确的做法是
User-agent: *
Disallow: /index.php/mycontroller/function
是,Pattle是正确的关于URL引用的文件夹通常不直接索引,他们获得索引,当他们在一个页面被发现,而应用文件夹甚至不应该通过浏览器/互联网访问。于是竖起大拇指:万一
User-agent: *
Disallow: /index.php/mycontroller/function
Disallow: /mycontroller/function
你的config.php文件中删除“的index.php”。