mirror of
https://github.com/kubesphere/website.git
synced 2025-12-26 00:12:48 +00:00
Merge pull request #3281 from fuchunlan/remove-doc-1
fix: Disable doc url
This commit is contained in:
commit
c9d3f06cb2
|
|
@ -1,3 +1,24 @@
|
|||
{{ $disabled := or (hasPrefix .RelPermalink "/zh/docs/v3.3")
|
||||
(hasPrefix .RelPermalink "/zh/docs/v3.4")
|
||||
(hasPrefix .RelPermalink "/zh/docs/v4.1")
|
||||
(hasPrefix .RelPermalink "/docs/v3.3")
|
||||
(hasPrefix .RelPermalink "/docs/v3.4")
|
||||
(hasPrefix .RelPermalink "/docs/v4.1") }}
|
||||
|
||||
{{ if $disabled }}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0; url=/404.html">
|
||||
<script>window.location = '/404.html';</script>
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<meta http-equiv="Cache-Control" content="no-store">
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
{{ return }}
|
||||
{{ end }}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
|
||||
|
||||
|
|
|
|||
14
netlify.toml
14
netlify.toml
|
|
@ -28,3 +28,17 @@
|
|||
status = 301
|
||||
force = true
|
||||
|
||||
[[redirects]]
|
||||
from = "^/(zh/)?docs/(v3\\.3|v3\\.4|v4\\.1)(/.*)?$"
|
||||
to = "/404.html"
|
||||
status = 404
|
||||
force = true
|
||||
conditions = { Role = "all" }
|
||||
|
||||
[[headers]]
|
||||
for = "^(/zh)?/docs/(v3\\.3|v3\\.4|v4\\.1)(/.*)?$"
|
||||
[headers.values]
|
||||
Cache-Control = "no-store, max-age=0"
|
||||
X-Robots-Tag = "noindex, nofollow"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue