-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
~.htaccess
33 lines (24 loc) · 1.08 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
RewriteEngine on
RewriteBase /
# redirect id->doc doc->public/index.php
RewriteRule ^id/file-format/(.+)$ doc/file-format/$1 [R=303]
RewriteRule ^doc/file-format/(.+)$ data-response-handler.php
RewriteRule ^data/file-format/(.+)$ data-response-handler.php
# pronom re-write rules
RewriteRule ^api/id/puid/fmt/(.+)$ api-response-handler.php
RewriteRule ^api/id/puid/x-fmt/(.+)$ api-response-handler.php
RewriteRule ^api/id/puid/xfmt/(.+)$ api-response-handler.php
RewriteRule ^def/format-registry/(.+)$ data-response-handler.php
RewriteRule ^prop/format-registry/(.+)$ data-response-handler.php
#RewriteRule ^id/(.+)$ index.php
#RewriteRule ^doc/(.+)$ index.php
RewriteCond %{REQUEST_URI} !^/id/(.+)$
RewriteCond %{REQUEST_URI} !^/doc/(.+)$
RewriteCond %{REQUEST_URI} !^/api/(.+)$
RewriteCond %{REQUEST_URI} !^/def/(.+)$
RewriteCond %{REQUEST_URI} !^/prop/(.+)$
# allow access to certain file types
RewriteRule !\.(js|ico|txt|gif|jpg|png|css|php|nt|rdf|json|xml|tsv|ttl)$ /index.php
# prevent access to code in private folder
RewriteRule ^(private/) - [F,L,NC]
# php_flag magic_quotes_gpc off