-
Notifications
You must be signed in to change notification settings - Fork 22
/
redirects.yaml
46 lines (34 loc) · 1.8 KB
/
redirects.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Specific rules
# ===
# MAAS
maas: https://docs.maas.io/
maas/(?P<page>.*): https://docs.maas.io/{page}
# conjure-up
conjure-up: https://docs.conjure-up.io/
conjure-up/(?P<page>.*): https://docs.conjure-up.io/{page}
# snap-store-proxy
snap-enterprise-proxy: /snap-store-proxy/en/
snap-enterprise-proxy/(?P<page>.*): /snap-store-proxy/{page}
# Landscape
landscape/en/?: https://ubuntu.com/landscape/docs
landscape/en/: https://ubuntu.com/landscape/docs
landscape/en/landscape-api/?: /landscape/en/api
landscape/en/onprem-overview/?: /landscape/en/onprem
landscape/en/landscape-install-quickstart/?: https://ubuntu.com/landscape/docs/quickstart-deployment
# Documentation-builder
documentation-builder/?: https://github.com/canonical-webteam/documentation-builder/tree/master/docs
documentation-builder/(?P<page>.*)/: https://github.com/canonical-webteam/documentation-builder/tree/master/docs/{page}
documentation-builder/(?P<page>.*[^/])?(.html)?: https://github.com/canonical-webteam/documentation-builder/tree/master/docs/{page}.md
# Generic rules
# ===
# Redirect project section roots to English language
(?P<project>(landscape|snap-store-proxy|styleguide))/?: /{project}/en/
# Add slash to language and version folders, and remove "index"
(?P<project>(landscape|snap-store-proxy))/(?P<language>[a-zA-Z]{2})(/index)?: /{project}/{language}/
# Remove trailing slash or .html from document URLs
(?P<project>(landscape|snap-store-proxy))/(?P<version>[a-zA-Z0-9-\._]+/)?(?P<language>[a-zA-Z]{2})/(?P<document>.*)(/|.html): /{project}/{version}{language}/{document}
# Redirect to www.ubuntu.com search
search/?$: https://www.ubuntu.com/search
# core, phone subdomains
(?P<project>(core|phone))(/en)?/?(?P<path>.*): https://{project}.docs.ubuntu.com/en/{path}
landscape/en/(?P<path>.*)/?: https://www.ubuntu.com/landscape/docs/{path}