This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
forked from MobilityData/gtfs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
70 lines (67 loc) · 5.53 KB
/
.htaccess
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Redirect for simple redirections
Redirect 301 /schedule/reference/ /documentation/schedule/reference/
Redirect 301 /schedule/best-practices/ /documentation/schedule/GTFS%20schedule%20best%20Practices/
Redirect 301 /schedule/examples/ /documentation/overview/
Redirect 301 /schedule/example-feed/ /getting_started/example_feed/
Redirect 301 /schedule/examples/routes-stops-trips/ /documentation/schedule/examples/routes-stops-trips/
Redirect 301 /schedule/examples/continuous-stops/ /documentation/schedule/examples/continuous-stops/
Redirect 301 /schedule/examples/text-to-speech/ /documentation/schedule/examples/text-to-speech/
Redirect 301 /schedule/examples/fares-v1/ /documentation/schedule/examples/fares-v1/
Redirect 301 /schedule/examples/fares-v2/ /documentation/schedule/examples/fares-v2/
Redirect 301 /schedule/examples/frequencies/ /documentation/schedule/examples/frequencies/
Redirect 301 /schedule/examples/pathways/ /documentation/schedule/examples/pathways/
Redirect 301 /schedule/examples/transfers/ /documentation/schedule/examples/transfers/
Redirect 301 /schedule/examples/translations/ /documentation/schedule/examples/translations/
Redirect 301 /schedule/examples/feed-info/ /documentation/schedule/examples/feed-info/
Redirect 301 /schedule/examples/attributions/ /documentation/schedule/examples/attributions/
Redirect 301 /schedule/examples/flex/ /documentation/schedule/examples/flex/
Redirect 301 /schedule/changes/ /documentation/schedule/change_history/recent_additions/
Redirect 301 /schedule/process/ /community/governance/gtfs_schedule_amendment_process/
Redirect 301 /schedule/validate/ /getting_started/validate/
Redirect 301 /schedule/publishing/ /getting_started/publish/
Redirect 301 /realtime/ /documentation/overview/
Redirect 301 /realtime/reference/ /documentation/realtime/reference/
Redirect 301 /realtime/best-practices/ /documentation/realtime/realtime_best_practices/
Redirect 301 /realtime/feed-entities/ /documentation/realtime/feed_entities/overview/
Redirect 301 /realtime/feed-entities/trip-updates/ /documentation/realtime/feed_entities/trip-updates/
Redirect 301 /realtime/feed-entities/service-alerts/ /documentation/realtime/feed_entities/service-alerts/
Redirect 301 /realtime/feed-entities/vehicle-positions/ /documentation/realtime/feed_entities/vehicle-positions/
Redirect 301 /realtime/feed-entities/trip-modifications/ /documentation/realtime/feed_entities/trip-modifications/
Redirect 301 /realtime/feed-examples/ /documentation/overview/
Redirect 301 /realtime/feed-examples/trip-updates/ /documentation/realtime/examples/trip-updates/
Redirect 301 /realtime/feed-examples/service-alerts/ /documentation/realtime/examples/service-alerts/
Redirect 301 /realtime/proto/ /documentation/realtime/proto/
Redirect 301 /realtime/language-bindings/ /documentation/realtime/language-bindings/overview/
Redirect 301 /realtime/language-bindings/dotnet/ /documentation/realtime/language-bindings/dotnet/
Redirect 301 /realtime/language-bindings/java/ /documentation/realtime/language-bindings/java/
Redirect 301 /realtime/language-bindings/nodejs/ /documentation/realtime/language-bindings/nodejs/
Redirect 301 /realtime/language-bindings/python/ /documentation/realtime/language-bindings/python/
Redirect 301 /realtime/language-bindings/golang/ /documentation/realtime/language-bindings/golang/
Redirect 301 /realtime/language-bindings/ruby/ /documentation/realtime/language-bindings/ruby/
Redirect 301 /realtime/language-bindings/php/ /documentation/realtime/language-bindings/php/
Redirect 301 /realtime/changes/ /documentation/realtime/change_history/recent_additions/
Redirect 301 /realtime/process/ /community/governance/gtfs_realtime_amendment_process/
Redirect 301 /resources/ /resources/overview/
Redirect 301 /resources/community/ /community/get_involved/
Redirect 301 /extensions/ /community/extensions/overview/
Redirect 301 /extensions/fares-v2/ /community/extensions/fares-v2/
Redirect 301 /extensions/flex/ /community/extensions/flex/
# Anchor redirections
RewriteEngine On
RewriteRule ^realtime/process/#guiding-principles https://gtfs.org/community/governance/gtfs_realtime_amendment_process/#guiding-principles [R=301,NE]
RewriteRule ^realtime/process/#revision-history https://gtfs.org/documentation/realtime/change_history/revision_history/ [R=301]
RewriteRule ^realtime/process/#experimental-fields https://gtfs.org/community/governance/gtfs_realtime_amendment_process/#experimental-fields [R=301,NE]
RewriteRule ^#why-use-gtfs https://gtfs.org/getting_started/why_use_GTFS/ [R=301]
RewriteRule ^#what-is-high-quality-gtfs https://gtfs.org/getting_started/validate/ [R=301]
RewriteRule ^schedule/#getting-started https://gtfs.org/getting_started/create/ [R=301]
RewriteRule ^schedule/#training-resources https://gtfs.org/resources/overview/ [R=301]
RewriteRule ^schedule/#getting-help-community https://gtfs.org/community/get_involved/ [R=301]
RewriteRule ^schedule/process/#guiding-principles https://gtfs.org/community/governance/gtfs_schedule_amendment_process/#guiding-principles [R=301,NE]
RewriteRule ^schedule/process/#revision-history https://gtfs.org/documentation/schedule/change_history/revision_history/ [R=301]
# Match any URL trying to access the blog in anything but EN and redirect them to EN
RewriteCond %{REQUEST_URI} ^/(?:fr|es|ja|ru|pt|ko|id|de|zh|zh-TW)/blog/
RewriteRule ^(.+?)/.+$ /blog/ [L,R=302]
# Match any URL under /ja, /ru, /pt, /ko, /id, /de, /zh, or /zh-TW and redirect to the corresponding index.html
RewriteCond %{REQUEST_URI} ^/(ja|ru|pt|ko|id|de|zh|zh-TW)/
RewriteCond %{REQUEST_URI} !index\.html$
RewriteRule ^(.+?)/.+$ /$1/index.html [L,R=302]