forked from open-mpi/ompi-www
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
95 lines (80 loc) · 4.22 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
88
89
90
91
92
93
94
95
## You should disable Indexes and MultiViews either here or in the
## global config. Symlinks maybe needed for URL rewriting.
Options -Indexes -MultiViews +FollowSymLinks
## We likes our Tumblebeasts
ErrorDocument 404 /404.php
## Make sure nobody gets the htaccess files
<Files ~ "^[\._]ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
## Protect the recaptcha keys
<Files ~ "pmix-recaptcha-keys.php">
Order allow,deny
Deny from all
Satisfy All
</Files>
## Don't let anyone look at the internal site doco, either
<Files ~ "doc-www">
Order allow,deny
Deny from all
Satisfy All
</Files>
## Make sure no one gets to the .git dir
RedirectMatch 404 /\.git
## Anyone remember what this was from?
Deny from 180.211.180.14
# With build artifacts in S3, latest_snapshot.txt is a
# PHP script that generates the right answer, so turn
# on PHP processing for those files.
<Files "latest_snapshot.txt">
AddHandler application/x-httpd-php .txt
</Files>
## Comment these rules in if you want to have nice URLs using
## $conf['rewrite'] = 1 - not needed for rewrite mode 2
<IfModule mod_rewrite.c>
RewriteEngine on
## Redirect everyone from open-mpi.org to https://wwww.open-mpi.org
RewriteCond %{HTTP_HOST} ^open-mpi.org [NC]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
## Redirect everyone from http:// to https://
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
## These probably aren't necessary any more
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^MailArchives/(.*)$ /community/lists/$1 [L,R=301]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.+)(\.php|\.html)/$ /$1$2 [R=301,L]
# Redirect requests for nightly tarballs / nightly latest_snapshot.txt requests
# to download.open-mpi.org.
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule software/(.*)/nightly/(.*)/(latest_snapshot\.txt|.*\.tar\.gz|.*\.tar\.bz2) https://download.open-mpi.org/nightly/$1/$2/$3 [L,R=302]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule nightly/(.*)/(latest_snapshot\.txt|.*\.tar\.gz|.*\.tar\.bz2) https://download.open-mpi.org/nightly/open-mpi/$1/$2 [L,R=302]
# Redirect requests for release artifacts to download.open-mpi.org
RewriteCond %{REQUEST_URI} !latest_snapshot.txt$ [NC]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule software/ompi/(.*)/downloads/(.*) https://download.open-mpi.org/release/open-mpi/$1/$2 [L,R=301]
RewriteCond %{REQUEST_URI} !latest_snapshot.txt$ [NC]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule software/(.*)/(.*)/downloads/(.*) https://download.open-mpi.org/release/$1/$2/$3 [L,R=301]
</IfModule>