简体   繁体   English

Laravel中的robots.txt

[英]robots.txt in Laravel

I just was wondering if the robots.txt file is supposed to work like general robots txt files. 我只是想知道robots.txt文件是否应该像普通的robots txt文件一样工作。 So, you type for example "disallow/admin/*" place it into the the root Laravel folder and that's it. 因此,您输入例如“ disallow / admin / *”将其放置在根Laravel文件夹中,仅此而已。

Is it like this ? 是这样吗?

Remember, that website address is relevant to public dir. 请记住,该网站地址与公共目录有关。 So, if you want robots.txt to work in Laravel , it must be placed in the public folder. 所以,如果你想在robots.txt的 Laravel工作,它必须被放置在public文件夹中。

robots.txt is a special file used by search bots to read and crawl the website resources. robots.txt是搜索机器人用于读取和抓取网站资源的特殊文件。

robots.txt should be at the root of the website. robots.txt应该位于网站的根目录。

The root directory differs from OS to OS. 根目录因操作系统而异。 I am giving a few of them. 我给他们几个。 Better that you consult with your server admin. 最好您咨询服务器管理员。

Example: 例:

/public_html
/htdocs
/html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM