forked from rbroek/objectiv.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess-production
239 lines (220 loc) · 16.2 KB
/
.htaccess-production
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# GZIP compression on TransIP: https://www.transip.nl/knowledgebase/artikel/366-gzip-gebruiken-in-wordpress/
<IfModule mod_deflate.c>
# force deflate for mangled headers
# developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'text/html'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'text/css'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'text/plain'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'text/xml'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'text/x-component'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'application/javascript'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'application/json'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'application/xml'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'application/xhtml+xml'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'application/rss+xml'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'application/atom+xml'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'application/vnd.ms-fontobject'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'image/svg+xml'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'application/x-font-ttf'"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'font/opentype'"
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
</IfModule>
<IfModule !mod_filter.c>
# Legacy versions of Apache
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml
AddOutputFilterByType DEFLATE application/atom+xml
AddOutputFilterByType DEFLATE image/svg+xml application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font-ttf font/opentype
</IfModule>
</IfModule>
# redirect to https
RewriteEngine On
RewriteCond %{HTTP_HOST} ^objectiv.io [NC]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://objectiv.io/$1 [R]
# redirect old Demo URLs
# /docs/home/try-the-demo -> /docs/home/up
RewriteCond %{REQUEST_URI} ^/(docs/home/try-the-demo)(\/?)$
RewriteRule ^.*?$ /docs/home/up/ [L,R=301]
# /docs/home/get-a-launchpad -> /docs/home/up
RewriteCond %{REQUEST_URI} ^/(docs/home/get-a-launchpad)(\/?)$
RewriteRule ^.*?$ /docs/home/up/ [L,R=301]
# redirect even older Demo URL
# /docs/home/quickstart-guide -> /docs/home/up
RewriteCond %{REQUEST_URI} ^/(docs/home/quickstart-guide)(\/?)$
RewriteRule ^.*?$ /docs/home/up/ [L,R=301]
# redirect old Modeling docs URLs
# /docs/modeling/models_aggregation -> /docs/modeling/open-model-hub/models/aggregation
RewriteCond %{REQUEST_URI} ^/(docs/modeling/models_aggregation)(\/?)$
RewriteRule ^.*?$ /docs/modeling/open-model-hub/models/aggregation/ [L,R=301]
# /docs/modeling/models_mapping -> /docs/modeling/open-model-hub/models/helper-functions
RewriteCond %{REQUEST_URI} ^/(docs/modeling/models_mapping)(\/?)$
RewriteRule ^.*?$ /docs/modeling/open-model-hub/models/helper-functions/ [L,R=301]
# /docs/modeling/models -> /docs/modeling/open-model-hub/models/
RewriteCond %{REQUEST_URI} ^/(docs/modeling/models)([a-zA-Z]*)
RewriteRule ^.*?$ /docs/modeling/open-model-hub/models/%2 [L,R=301]
# /docs/modeling/open-model-hub/api-reference/ModelHub/LogisticRegression/* -> /docs/modeling/open-model-hub/models/machine-learning/
RewriteCond %{REQUEST_URI} ^/(docs/modeling/open-model-hub/api-reference/ModelHub/LogisticRegression)
RewriteRule ^.*?$ /docs/modeling/open-model-hub/models/machine-learning/ [L,R=301]
# /docs/modeling/modelhub_api_reference/modelhub.Aggregate.frequency -> /docs/modeling/open-model-hub/models/aggregation/frequency
RewriteCond %{REQUEST_URI} ^/(docs/modeling/modelhub_api_reference/modelhub\.Aggregate(?:\.([\S]+))?)
RewriteRule ^.*?$ /docs/modeling/open-model-hub/models/aggregation/%2 [L,R=301]
# /docs/modeling/modelhub_api_reference/modelhub.Map.conversions_counter -> /docs/modeling/open-model-hub/models/helper-functions/conversions_counter
RewriteCond %{REQUEST_URI} ^/(docs/modeling/modelhub_api_reference/modelhub\.Map(?:\.([\S]+))?)
RewriteRule ^.*?$ /docs/modeling/open-model-hub/models/helper-functions/%2 [L,R=301]
# /docs/modeling/modelhub_api_reference/modelhub.ModelHub -> /docs/modeling/open-model-hub/api-reference/ModelHub
RewriteCond %{REQUEST_URI} ^/(docs/modeling/modelhub_api_reference/modelhub.ModelHub)(\/?)$
RewriteRule ^.*?$ /docs/modeling/open-model-hub/api-reference/ModelHub/ [L,R=301]
# /docs/modeling/modelhub_api_reference/ -> /docs/modeling/open-model-hub/api-reference
RewriteCond %{REQUEST_URI} ^/(docs/modeling/modelhub_api_reference)(\/?)$
RewriteRule ^.*?$ /docs/modeling/open-model-hub/api-reference/ [L,R=301]
# /docs/modeling/modelhub_api_reference/modelhub.ModelHub.add_conversion_event -> /docs/modeling/open-model-hub/api-reference/ModelHub/add_conversion_event
# /docs/modeling/modelhub_api_reference/modelhub.SeriesGlobalContexts -> /docs/modeling/open-model-hub/api-reference/SeriesGlobalContexts/
# /docs/modeling/modelhub_api_reference/modelhub.SeriesGlobalContexts.gc -> /docs/modeling/open-model-hub/api-reference/SeriesGlobalContexts/gc
# /docs/modeling/modelhub_api_reference/modelhub.SeriesLocationStack -> /docs/modeling/open-model-hub/api-reference/SeriesLocationStack/
# /docs/modeling/modelhub_api_reference/modelhub.SeriesLocationStack.ls -> /docs/modeling/open-model-hub/api-reference/SeriesLocationStack/ls
RewriteCond %{REQUEST_URI} ^/(docs/modeling/modelhub_api_reference)(?:/modelhub\.([a-zA-Z]+)(?:\.([\S]+))?)?$
RewriteRule ^.*?$ /docs/modeling/open-model-hub/api-reference/%2/%3 [L,R=301]
# /docs/modeling/bach_whatisbach -> /docs/modeling/bach/
# /docs/modeling/bach/what-is-bach -> /docs/modeling/bach/
# /docs/modeling/bach_core_concepts -> /docs/modeling/bach/core-concepts
# /docs/modeling/bach_examples -> /docs/modeling/bach/usage
# /docs/modeling/bach/examples -> /docs/modeling/bach/usage
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach_whatisbach)(\/?)$
RewriteRule ^.*?$ /docs/modeling/bach/ [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach/what-is-bach)(\/?)$
RewriteRule ^.*?$ /docs/modeling/bach/ [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach_core_concepts)(\/?)$
RewriteRule ^.*?$ /docs/modeling/bach/core-concepts/ [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach_examples)(\/?)$
RewriteRule ^.*?$ /docs/modeling/bach/usage/ [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach/examples)(\/?)$
RewriteRule ^.*?$ /docs/modeling/bach/usage/ [L,R=301]
# /docs/modeling/bach_reference -> /docs/modeling/bach/api-reference/
# /docs/modeling/bach_reference_dataframe -> /docs/modeling/bach/api-reference/DataFrame/
# /docs/modeling/bach_reference_dataframe_by_function -> /docs/modeling/bach/api-reference/DataFrame/
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach_reference)(\/?)$
RewriteRule ^.*?$ /docs/modeling/bach/api-reference/ [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach_reference_dataframe)
RewriteRule ^.*?$ /docs/modeling/bach/api-reference/DataFrame/ [L,R=301]
# /docs/modeling/bach_reference_series -> /docs/modeling/bach/api-reference/Series/
# /docs/modeling/bach_reference_series_by_function -> /docs/modeling/bach/api-reference/Series/
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach_reference_series)
RewriteRule ^.*?$ /docs/modeling/bach/api-reference/Series/ [L,R=301]
# /docs/modeling/bach/api-reference/Series/index_sorting -> /docs/modeling/bach/api-reference/Series/
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach/api-reference/Series/index_sorting)(\/?)$
RewriteRule ^.*?$ /docs/modeling/bach/api-reference/Series/ [L,R=301]
# /docs/modeling/bach/api-reference/Series/sorted_ascending -> /docs/modeling/bach/api-reference/Series/
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach/api-reference/Series/sorted_ascending)(\/?)$
RewriteRule ^.*?$ /docs/modeling/bach/api-reference/Series/ [L,R=301]
# /docs/modeling/Series/bach.SeriesAbstractDateTime.dt -> /docs/modeling/bach/api-reference/Series/
# /docs/modeling/Series/bach.SeriesAbstractDateTime -> /docs/modeling/bach/api-reference/Series/
RewriteCond %{REQUEST_URI} ^/(docs/modeling/Series/bach.SeriesAbstractDateTime)
RewriteRule ^.*?$ /docs/modeling/bach/api-reference/Series/ [L,R=301]
# /docs/modeling/bach/api-reference/Series/AbstractDateTime -> /docs/modeling/bach/api-reference/Series/
# /docs/modeling/bach/api-reference/Series/AbstractDateTime/dt -> /docs/modeling/bach/api-reference/Series/
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach/api-reference/Series/AbstractDateTime)
RewriteRule ^.*?$ /docs/modeling/bach/api-reference/Series/ [L,R=301]
# /docs/modeling/bach/api-reference/Series/Jsonb -> /docs/modeling/bach/api-reference/Series/Json
# /docs/modeling/bach/api-reference/Series/Jsonb/json -> /docs/modeling/bach/api-reference/Series/Json
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach/api-reference/Series/Jsonb)
RewriteRule ^.*?$ /docs/modeling/bach/api-reference/Series/Json/ [L,R=301]
# /docs/modeling/Series/bach.SeriesAbstractNumeric -> /docs/modeling/bach/api-reference/Series/AbstractNumeric
# /docs/modeling/Series/bach.SeriesAbstractNumeric.cut -> /docs/modeling/bach/api-reference/Series/AbstractNumeric/cut
# /docs/modeling/Series/bach.SeriesBoolean -> /docs/modeling/bach/api-reference/Series/Boolean
# /docs/modeling/Series/bach.SeriesBoolean.max -> /docs/modeling/bach/api-reference/Series/Boolean/max
# /docs/modeling/Series/bach.SeriesJson -> /docs/modeling/bach/api-reference/Series/Json
# /docs/modeling/Series/bach.SeriesJsonb -> /docs/modeling/bach/api-reference/Series/Jsonb
# /docs/modeling/Series/bach.SeriesJsonb.json -> /docs/modeling/bach/api-reference/Series/Jsonb/json
# /docs/modeling/Series/bach.SeriesString -> /docs/modeling/bach/api-reference/Series/String
# /docs/modeling/Series/bach.SeriesString.get_dummies -> /docs/modeling/bach/api-reference/Series/String/get_dummies
RewriteCond %{REQUEST_URI} ^/(docs/modeling/Series/bach.Series)([a-zA-Z+]+)(?:\.([\S]+))?
RewriteRule ^.*?$ /docs/modeling/bach/api-reference/Series/%2/%3 [L,R=301]
# /docs/modeling/bach -> /docs/modeling/bach/
RewriteCond %{REQUEST_URI} ^/(docs/modeling/bach)$
RewriteRule ^.*?$ /docs/modeling/bach/ [L,R=301]
# /docs/modeling/DataFrame -> /docs/modeling/bach/api-reference/DataFrame/
# /docs/modeling/DataFrame/bach.DataFrame -> /docs/modeling/bach/api-reference/DataFrame/
# /docs/modeling/DataFrame/bach.DataFrame.max -> /docs/modeling/bach/api-reference/DataFrame/max
# /docs/modeling/Series -> /docs/modeling/bach/api-reference/Series/
# /docs/modeling/Series/bach.Series -> /docs/modeling/bach/api-reference/Series/
# /docs/modeling/Series/bach.Series.agg -> /docs/modeling/bach/api-reference/Series/agg
RewriteCond %{REQUEST_URI} ^/(docs/modeling)/([a-zA-Z]+)(?:/bach\.[a-zA-Z]+(?:\.([\S]+))?)?$
RewriteRule ^.*?$ /%1/bach/api-reference/%2/%3 [L,R=301]
# /docs/modeling/example_notebooks -> /docs/modeling/example-notebooks/
# /docs/modeling/feature_engineering -> /docs/modeling/example-notebooks/feature-engineering
# /docs/modeling/machine_learning -> /docs/modeling/example-notebooks/machine-learning
# /docs/modeling/modelhub_basics -> /docs/modeling/example-notebooks/modelhub-basics
# /docs/modeling/open_taxonomy -> /docs/modeling/example-notebooks/open-taxonomy
# /docs/modeling/product_analytics -> /docs/modeling/example-notebooks/product-analytics
# /docs/modeling/user_intent -> /docs/modeling/example-notebooks/user-intent
# /docs/modeling/feature_importance -> /docs/modeling/example-notebooks/feature-importance
RewriteCond %{REQUEST_URI} ^/(docs/modeling/example_notebooks)(\/?)$
RewriteRule ^.*?$ /docs/modeling/example-notebooks/ [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/feature_engineering)(\/?)$
RewriteRule ^.*?$ /docs/modeling/example-notebooks/feature-engineering [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/machine_learning)(\/?)$
RewriteRule ^.*?$ /docs/modeling/example-notebooks/machine-learning [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/modelhub_basics)(\/?)$
RewriteRule ^.*?$ /docs/modeling/example-notebooks/modelhub-basics [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/open_taxonomy)(\/?)$
RewriteRule ^.*?$ /docs/modeling/example-notebooks/open-taxonomy [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/product_analytics)(\/?)$
RewriteRule ^.*?$ /docs/modeling/example-notebooks/product-analytics [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/user_intent)(\/?)$
RewriteRule ^.*?$ /docs/modeling/example-notebooks/user-intent [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/modeling/example-notebooks/feature_importance)(\/?)$
RewriteRule ^.*?$ /docs/modeling/example-notebooks/feature-importance [L,R=301]
# redirect old Taxonomy docs URLs
# /docs/taxonomy/core_concepts -> /docs/taxonomy/
RewriteCond %{REQUEST_URI} ^/(docs/taxonomy/core-concepts)(\/?)$
RewriteRule ^.*?$ /docs/taxonomy/ [L,R=301]
# /docs/tracking/collector/getting-started --> /docs/tracking/collector/
# /docs/tracking/collector/troubleshooting --> /docs/tracking/collector/
RewriteCond %{REQUEST_URI} ^/(docs/tracking/collector/getting-started)(\/?)$
RewriteRule ^.*?$ /docs/tracking/collector/ [L,R=301]
RewriteCond %{REQUEST_URI} ^/(docs/tracking/collector/troubleshooting)(\/?)$
RewriteRule ^.*?$ /docs/tracking/collector/ [L,R=301]
# /docs/tracking/core-concepts/locations --> /docs/tracking/locations/
RewriteCond %{REQUEST_URI} ^/(docs/tracking/core-concepts/locations)(\/?)$
RewriteRule ^.*?$ /docs/tracking/locations/ [L,R=301]
# /docs/tracking/core-concepts/trackers --> /docs/tracking/sdks/
RewriteCond %{REQUEST_URI} ^/(docs/tracking/core-concepts/trackers)(\/?)$
RewriteRule ^.*?$ /docs/tracking/sdks/ [L,R=301]
# /docs/tracking/core-concepts/validation --> /docs/tracking/validation/
RewriteCond %{REQUEST_URI} ^/(docs/tracking/core-concepts/validation)(\/?)$
RewriteRule ^.*?$ /docs/tracking/validation/ [L,R=301]
# /docs/tracking/core-concepts/react --> /docs/tracking/react/how-to-guides/best-practices/
RewriteCond %{REQUEST_URI} ^/(docs/tracking/core-concepts/react)(\/?)$
RewriteRule ^.*?$ /docs/tracking/react/how-to-guides/best-practices/ [L,R=301]
# /docs/tracking/core-concepts/react-native --> /docs/tracking/react-native/how-to-guides/best-practices/
RewriteCond %{REQUEST_URI} ^/(docs/tracking/core-concepts/react-native)(\/?)$
RewriteRule ^.*?$ /docs/tracking/react-native/how-to-guides/best-practices/ [L,R=301]
# /docs/tracking/core-concepts/browser/validation --> /docs/tracking/validation/
RewriteCond %{REQUEST_URI} ^/(docs/tracking/core-concepts/browser/validation)(\/?)$
RewriteRule ^.*?$ /docs/tracking/validation/ [L,R=301]
# /docs/tracking/core-concepts/browser --> /docs/tracking/browser/how-to-guides/tagging-locations/
RewriteCond %{REQUEST_URI} ^/(docs/tracking/core-concepts/browser)(\/?)$
RewriteRule ^.*?$ /docs/tracking/browser/how-to-guides/tagging-locations/ [L,R=301]
# /docs/tracking/core-concepts/angular/validation --> /docs/tracking/validation/
RewriteCond %{REQUEST_URI} ^/(docs/tracking/core-concepts/angular/validation)(\/?)$
RewriteRule ^.*?$ /docs/tracking/validation/ [L,R=301]
# /docs/tracking/core-concepts/angular --> /docs/tracking/angular/how-to-guides/tagging-locations/
RewriteCond %{REQUEST_URI} ^/(docs/tracking/core-concepts/angular)(\/?)$
RewriteRule ^.*?$ /docs/tracking/angular/how-to-guides/tagging-locations/ [L,R=301]
# set hsts header, to prevent client from returning to http
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS