File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,40 @@ server {
167167 rewrite ^ /$current_version.x/sitemap.xml last;
168168 }
169169
170+ # Serve robots.txt
171+ location = /robots.txt {
172+ add_header Content-Type text/plain;
173+ return 200 "# CakePHP Documentation - robots.txt
174+ User-agent: *
175+
176+ # Default: Allow everything
177+ Allow: /
178+
179+ # Block deprecated language paths (these redirect)
180+ Disallow: /*/fr/
181+ Disallow: /*/pt/
182+ Disallow: /*/es/
183+ Disallow: /*/ru/
184+ Disallow: /*/tr/
185+ Disallow: /*/zh/
186+ Disallow: /*/de/
187+ Disallow: /*/ms/
188+ Disallow: /*/go/
189+ Disallow: /*/en/
190+
191+ # Block development versions (constantly changing)
192+ Disallow: /*.next/
193+
194+ # Block legacy versions (redirect to legacybook.cakephp.org)
195+ Disallow: /1.1/
196+ Disallow: /1.2/
197+ Disallow: /1.3/
198+
199+ # Sitemap
200+ Sitemap: https://book.cakephp.org/sitemap.xml
201+ ";
202+ }
203+
170204 # ========================================
171205 # Version root and language redirects
172206 # ========================================
You can’t perform that action at this time.
0 commit comments