forked from drachenwald/drachenwald
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
82 lines (64 loc) · 3.46 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
---
layout: none
---
# Set an environment variable that we don't want archive content indexed by search engines
SetEnvIf Request_URI "^/drupal" NOINDEX
SetEnvIf Request_URI "^/content" NOINDEX
SetEnvIf Request_URI "^/node" NOINDEX
SetEnvIf Request_URI "^/wordpress" NOINDEX
SetEnvIf Request_URI "^/sites" NOINDEX
# We make an exception for these URLs which have high ranking that we'd like to keep
SetEnvIf Request_URI "^/node/69" !NOINDEX
SetEnvIf Request_URI "^/drupal/content/kingdom-event-calendar$" !NOINDEX
SetEnvIf Request_URI "^/content/kingdom-event-calendar$" !NOINDEX
SetEnvIf Request_URI "^/content/kingdom-officers-drachenwald$" !NOINDEX
SetEnvIf Request_URI "^/content/chatelaines-page$" !NOINDEX
SetEnvIf Request_URI "^/content/awards-orders$" !NOINDEX
SetEnvIf Request_URI "^/content/arts-and-sciences$" !NOINDEX
SetEnvIf Request_URI "^/content/drachenwald-laurels$" !NOINDEX
SetEnvIf Request_URI "^/content/germany$" !NOINDEX
SetEnvIf Request_URI "^/content/academy-defence$" !NOINDEX
SetEnvIf Request_URI "^/content/university-chancellor$" !NOINDEX
SetEnvIf Request_URI "^/content/signet-clerk$" !NOINDEX
# Send do-not-index header based on the environment variable set above
<IfModule headers_module>
header set X-Clacks-Overhead "GNU Terafan Greydragon"
header always add X-Robots-Tag "noindex, nofollow" env=NOINDEX
</IfModule>
Options -Indexes
AddDefaultCharset utf-8
AddCharset utf-8 .xml
# Fresh versions of previous pages
Redirect 301 /j/ {{ site.url }}/
Redirect 301 /drupal/content/kingdom-event-calendar {{ site.url }}/events/calendar/
Redirect 301 /content/kingdom-event-calendar {{ site.url }}/events/calendar/
Redirect 301 /node/69 {{ site.url }}/events/calendar/
# Old pages with high ranking in Google; let's send them somewhere useful
Redirect 301 /content/kingdom-officers-drachenwald {{ site.url }}/offices/
Redirect 301 /content/chatelaines-page {{ site.url }}/offices/chatelaine/
Redirect 301 /content/awards-orders {{ site.url }}/offices/herald/
Redirect 301 /content/arts-and-sciences {{ site.url }}/activities/artsci/
Redirect 301 /content/drachenwald-laurels {{ site.url }}/peers/laurel/
Redirect 301 /content/germany {{ site.url }}/groups/
Redirect 301 /content/academy-defence {{ site.url }}/chartergroups/academy-of-defense/
Redirect 301 /content/university-chancellor {{ site.url }}/offices/unichancellor/
Redirect 301 /content/signet-clerk {{ site.url }}/offices/signet/
# Other URLs associated with the previous site, redirect to the archive
Redirect 301 /drupal/ https://sca-drachenwald.gitlab.io/archive/
Redirect 301 /content/ https://sca-drachenwald.gitlab.io/archive/content/
Redirect 301 /node/ https://sca-drachenwald.gitlab.io/archive/node/
Redirect 301 /wordpress/ https://sca-drachenwald.gitlab.io/archive/wordpress/
Redirect 301 /sites/ https://sca-drachenwald.gitlab.io/archive/sites/
# Special site for forms
Redirect 301 /forms/ https://forms.drachenwald-sca.org/forms/
Redirect 301 /forms https://forms.drachenwald-sca.org/forms/
# Old This Is Drachenwald feed
Redirect 301 /thisis/rss.xml https://dis.drachenwald.sca.org/data/thisisdrachenwald.rss
# redirecting to the new book of ceremonies
Redirect 301 /offices/herald/files/ceremonies.pdf https://ceremonies.drachenwald.sca.org/
Redirect 301 /offices/herald/book-of-ceremonies/ https://ceremonies.drachenwald.sca.org/
RewriteEngine On
RewriteCond %{ENV:HTTPS} !on [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://drachenwald.sca.org%{REQUEST_URI} [L,NE,R=301]
ErrorDocument 404 /404.html