-
Notifications
You must be signed in to change notification settings - Fork 1
/
htaccess.sample
47 lines (36 loc) · 1.56 KB
/
htaccess.sample
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
# Disable index view
Options -Indexes
# Hide .env file
<Files .env>
Order allow,deny
Deny from all
</Files>
DirectoryIndex index.php
RewriteEngine on
RewriteBase /
RewriteRule ^services/ registry/ [R=301,L]
# Backward compatible DOI URL
RewriteRule ^doi/1.1/(.*)$ api/doi/$1 [R=301,L,QSA]
RewriteRule ^doi/1.0/(.*)$ api/doi/$1 [R=301,L,QSA]
RewriteRule ^doi/(.*)$ api/doi/$1 [R=301,L,QSA]
# ANDS-specific deploy rules (not needed in third-party deployment)
# RewriteRule ^apps/mydois/doi_(.*?)\.php api/doi/$1 [R=301,L,QSA]
# RewriteRule ^apps/mydois/(.*)\.(.*) https://researchdata.ands.org.au/api/doi/$1.$2 [NC,P]
# RewriteRule ^registry/orca/services/oai\.php registry/services/oai [R=301,L,QSA]
RewriteCond $1 ^(css|img|js|less|lib|uploads|shared|images)
RewriteRule ^assets/(.*?)/(.*)$ assets/$1/$2 [L]
RewriteRule ^assets/templates/(.*?)/(.*)$ applications/portal/templates/$1/assets/$2 [L]
RewriteRule ^assets/(.*?)/(.*)$ applications/portal/$1/assets/$2 [L]
RewriteCond $1 ^(registry|roles|apps|developer)
RewriteCond $2 ^(css|img|js|less|lib)
RewriteRule ^(.*?)/assets/(.*?)/(.*)$ assets/$2/$3 [L]
RewriteCond $1 !^applications/.*/
RewriteRule ^(.*?)/assets/(.*?)/(.*)$ applications/$1/$2/assets/$3 [L]
RewriteCond $1 !^(Shibboleth.sso)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/ [L]
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico|legacy|googledocverificationidfile\.html|Shibboleth.sso)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?)/(.*)$ ./index.php?/$2&app=$1 [L,QSA]