-
Notifications
You must be signed in to change notification settings - Fork 29
/
.htaccess
87 lines (73 loc) · 4.93 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<IfModule mod_rewrite.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpg "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
ExpiresByType image/svg+xml "access plus 1 months"
ExpiresByType image/vnd.microsoft.icon "access plus 1 months"
ExpiresByType image/x-icon "access plus 1 months"
ExpiresByType image/ico "access plus 1 months"
ExpiresByType application/javascript "now plus 1 months"
ExpiresByType application/x-javascript "now plus 1 months"
ExpiresByType text/javascript "now plus 1 week"
ExpiresByType text/css "now plus 1 week"
ExpiresDefault "access plus 3 days"
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/x-httpd-php
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
SetEnv DB_PASSWORD go1984bb
Header append Vary User-Agent env=!dont-vary
RewriteEngine On
#May be required to access sub-directories
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_URI} !^/search$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)([^/])$ /$1$2/ [L,R=301]
## ???
# RewriteCond %{HTTP_HOST} ^(www\.)?botwiki\.org$ [NC]
# RewriteRule ^submit/?$ https://docs.google.com/forms/d/1IZGM4AIUye_bp4e_8i1zXGcBqGxGAsLk61L4OeWJ5co/viewform [L,R=301,NC]
# RewriteRule ^submit-your-bot/?$ https://docs.google.com/forms/d/1IZGM4AIUye_bp4e_8i1zXGcBqGxGAsLk61L4OeWJ5co/viewform [L,R=301,NC]
</IfModule>
<IfModule mod_env.c>
SetEnv HTTPS on
</IfModule>
# Prevent file browsing
Options -Indexes
Redirect "/ph" "/"
RedirectMatch "^/submit-your-bot/*" "https://docs.google.com/forms/d/1IZGM4AIUye_bp4e_8i1zXGcBqGxGAsLk61L4OeWJ5co/viewform"
# Surveys
RedirectMatch "^/survey/botwiki-site-feedback/*" "https://docs.google.com/forms/d/e/1FAIpQLSftvuuPBngSTTBQgD1MKcCMUPF55xN10n829vfoEiChOCQVWw/viewform"
RedirectMatch "^/survey/bot-workshop-ideas/*" "https://docs.google.com/forms/d/13iqCihIBHWKgktZ6_w3dbRh5Oj6xtvs-cbukSyBG-5o/viewform"
RedirectMatch "^/survey/botmaking-01/*" "https://docs.google.com/forms/d/1MCKQSB2CCHUy7z-IDtNS-eSXQzXJWLEYGInF-Yd2CT4/viewform"
RedirectMatch "^/survey/the-big-botwiki-survey/*" "https://docs.google.com/forms/d/1s__aIJK14Ez_PUG4cAafUiqpfERqhVa5AiZmoER5DVE/viewform"
RedirectMatch "^/survey/quick-bot-survey/*" "https://docs.google.com/forms/d/1tASwWCIgJcd16gRJhamSNJoI8xOEwbzRsy52V2ZI9jQ/viewform"
RedirectMatch "^/survey/botmakers-community-survey/*" "https://docs.google.com/forms/d/1coP28xTpLZQvDeWmqcBE3TYKK403BLcrisv5tvpFP4s/viewform"
RedirectMatch "^/survey/bot-workshop-feedback/*" "https://docs.google.com/forms/d/e/1FAIpQLSc02KEU3JEypGnCCt_xR5UGCibwlvRGBPMn9vT3Ky9bsDZaiw/viewform"
RedirectMatch "^/survey/opensource/*" "https://docs.google.com/forms/d/e/1FAIpQLSepU-v4M7Za0FKgcJqSvKTsBWov8RouDiFBmzwp9YSDjz0JVA/viewform"
RedirectMatch "^/survey/botmakers-meetup/*" "https://docs.google.com/forms/d/e/1FAIpQLSdADcEFbFYkvL9QAMf_Tkd9fyfLYiQcsn4Lkyj-4oyx104T5A/viewform"
RedirectMatch "^/botmakers/erin/*" "https://botwiki.org/interviews/erin"
RedirectMatch "^/interviews/*$" "https://botwiki.org/tag/interview"
RedirectMatch "^/tutorials/bots-should-punch-up/*$" "https://botwiki.org/articles/bots-should-punch-up/"
RedirectMatch "^/tutorials/basic-twitter-bot-etiquette-tiny-subversions/*$" "https://botwiki.org/articles/basic-twitter-bot-etiquette-tiny-subversions/"
RedirectMatch "^/bot-workshops/workshop-01/*$" "https://botwiki.org/bot-workshops/botmaking-from-the-ground-up/"
RedirectMatch "^/tag/*$" "https://botwiki.org/tag/all-tags"
RedirectMatch "^/mbc/*$" "https://botwiki.org/monthly-bot-challenge"
RedirectMatch "^/bot-ethics/*$" "https://botwiki.org/articles/essays"
RedirectMatch "^/articles/bot-ethics/*$" "https://botwiki.org/articles/essays"
# Redirect old event pages
RedirectMatch "^/events/bot-summit-2016/*" "https://botwiki.org/events/2016/bot-summit-2016"
RedirectMatch "^/events/nanogenmo-2015/*" "https://botwiki.org/events/2015/nanogenmo-2015"
RedirectMatch "^/events/nanogenmo-2016/*" "https://botwiki.org/events/2016/nanogenmo-2016"
RedirectMatch "^/events/nabomamo-2016/*" "https://botwiki.org/events/2016/nabomamo-2016"
RedirectMatch "^/events/ibm-watson-robots-cognitive-iot-january-2016/*" "https://botwiki.org/events/2016/ibm-watson-robots-cognitive-iot-january-2016/"