-
Notifications
You must be signed in to change notification settings - Fork 22
/
redirects.yaml
50 lines (37 loc) · 2.07 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
47
48
49
50
# 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: https://documentation.ubuntu.com/snap-store-proxy
snap-enterprise-proxy/(?P<page>.*): https://documentation.ubuntu.com/snap-store-proxy
snap-store-proxy: https://documentation.ubuntu.com/snap-store-proxy
snap-store-proxy/en/: https://documentation.ubuntu.com/snap-store-proxy
snap-store-proxy/(?P<page>.*): https://documentation.ubuntu.com/snap-store-proxy
# 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}