Gitea 禁止搜索引擎索引搜录robots.txt配置

教程分享 (462) 2024-08-01 09:05:49

为了使 Gitea 为顶级安装提供自定义的robots.txt(默认为空的 404),请在 [custom文件夹或CustomPath](administration/customizing-gitea.md)中创建一个名为 public/robots.txt 的文件。

 

默认也就是   ./gitea/public/robots.txt

 

有关如何配置 robots.txt 的示例,请参考 https://moz.com/learn/seo/robotstxt

User-agent: *
Disallow: /
 

如果您将Gitea安装在子目录中,则需要在顶级目录中创建或编辑 robots.txt

User-agent: *
Disallow: /gitea/
https://www.leftso.com/article/2408010904544803.html

相关文章
为了使 Gitea 为顶级安装提供自定义的robots.txt(默认为空的 404),请在 [custom文件夹或CustomPath](administrat
Nginx 配置robots.txt禁止收录,在对应的server里面添加以下配置 location =/robots.txt { default_type t
方案一:Gitea + SQLIte (更轻量)version: "3"networks: gitea: external: falseservices: se
    // 删除本地分支 git branch -d localBranchName // 删除远程分支 git push origin --delete remoteB...
idea git合并代码说 please tell me who are you..  
git版本需要大于2.28.0 执行命令 git config --global init.defaultBranch main 搞定
问题描述git 提交代码报错 :error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413导致原因1. 本...
处理回滚有两种方案是软回滚,保留中间的git记录,让最新的commit代码与所选恢commit复版本相同。硬回滚,直接干掉所选回滚记录前的所有commit记录方法一(软回滚)(正式多人项目推荐)...
stash命令作用stash 命令能够将还未 commit 的代码暂存起来,让你的工作目录变得干净,同时讲解idea中stash界面使用操作。应用场景某一天你正
演示项目源码下载:(访问密码:9987)spring-cloud-config-server-git.zip微服务方法现在已经成为任何新 API 开发的行业标准,几乎所有组织都在推广它
ideagit回滚版本
Commit message 场景格式规范每次提交,Commit message 都包括三个部分:header,body 和 footer。<type&gtl;(<sc
情况说明webstorm 源文件中文显示乱码,同样版本的代码文件再git服务器显示正确
执行更新语句即可,以下哈希对应的密码是 123456 / 账户是 root,(账户也可以根据你自己的修改,name= ‘你的账户’)update user s