forked from gbif/rs.gbif.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvirt_rs.conf
50 lines (39 loc) · 1.92 KB
/
virt_rs.conf
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
<VirtualHost *:80>
ServerName rs.gbif.org
ServerAdmin [email protected]
ErrorLog logs/rs.gbif.org_errorlog
CustomLog logs/rs.gbif.org_log combined
DocumentRoot /var/www/rs.gbif.org/
DirectoryIndex index.html
Options +Indexes +FollowSymLinks
IndexOptions +SuppressHTMLPreamble
HeaderName /style/index_header.html
ReadmeName /style/index_footer.html
<Directory /var/www.rs.gbif.org/datasets/protected>
Order Deny,Allow
Deny from all
Allow from gbif.org
Allow from 192.38.28
Options +Indexes
</Directory>
# helper for the redirectors below. It devines a lc function which converts
# strings to lower
RewriteMap lc int:tolower
RewriteEngine on
# extension names differ from class names:
RewriteRule ^/terms/1.0/Reference/?$ /extension/gbif/1\.0/references\.xml [R]
RewriteRule ^/terms/1.0/Image/?$ /extension/gbif/1\.0/images\.xml [R]
# all other gbif extensions matching class to extension name:
RewriteRule ^/terms/([0-9.]+)/([A-Z][a-zA-Z]*)/?$ /extension/gbif/$1/${lc:$2}\.xml [R]
# resolve VOCAB urls
# manually treat some sandbox vocabs
RewriteRule ^/vocabulary/issg/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)$ /sandbox/vocabulary/issg/$1\.xml\#$2\:$3 [NE,R]
RewriteRule ^/vocabulary/issg/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)$ /sandbox/vocabulary/issg/$1\.xml\#$2 [NE,R]
# prod vocab urls
RewriteRule ^/vocabulary/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)?$ /vocabulary/$1/$2\.xml [R]
# resolve gbif terms
RewriteRule ^/terms/1.0/([a-z][a-zA-Z]+)$ http://gbif.github.io/dwc-api/apidocs/org/gbif/dwc/terms/GbifTerm.html\#$1 [NE,R]
# resolve issg sandbox terms
RewriteRule ^/issg/terms/[pP]athways?$ /sandbox/extension/issg-pathway.xml [NE,R]
RewriteRule ^/issg/terms/([a-zA-Z]+)$ /sandbox/extension/issg-distribution.xml [NE,R]
</VirtualHost>