0

How to create a robots.txt file in a codeigniter project to hide a view page . where should i place this robots.txt file currently i have created file like this

User-agent: *
Disallow: /application/views/myviewpage.php

in side /public_html/folder/robots.txt (Where i place my .htaccess file). Is there any way to test this?

4

1 回答 1

0

robots.txt 文件必须放在主机的文档根目录中。它不会在其他地方工作。

如果您的主机是example.com,它需要在http://example.com/robots.txt.

如果您的主机是www.example.com,它需要在http://www.example.com/robots.txt.

于 2013-11-05T13:06:44.650 回答