-
Notifications
You must be signed in to change notification settings - Fork 1
/
htaccess
50 lines (41 loc) · 1.91 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
# OntoWiki .htaccess file
# WARNING: If you do not use the htaccess at all or your htaccess is
# ignored, then your config.ini can be loaded over the web !!!
<Files "*.ini">
Deny from all
</Files>
# OntoWiki does not requires Apache's rewrite engine to work. However,
# if you would like to have nice (Linked Data) URIs you must enable URL
# rewriting by enabling mod_rewrite in your apache config.
<IfModule mod_rewrite.c>
RewriteEngine On
# This gives ontowiki an easy hint that rewrite is enabled
<IfModule mod_env.c>
SetEnv ONTOWIKI_APACHE_MOD_REWRITE_ENABLED 1
</IfModule>
RewriteCond %{THE_REQUEST} !ow_extensions/
RewriteCond %{THE_REQUEST} !csvimport/
RewriteCond %{THE_REQUEST} !younglives/
RewriteRule !((extensions|libraries).*|\.(js|ico|gif|jpg|png|css|php|swf|json))$ index.php
RewriteCond %{THE_REQUEST} ow_extensions/csvimport/
RewriteRule ow_extensions/csvimport/(.*) csvimport/$1
RewriteCond %{THE_REQUEST} ow_extensions/younglives/
RewriteRule ow_extensions/younglives/(.*) younglives/$1
# Set RewriteBase only if your OntoWiki folder is not located in your web server's root dir.
#RewriteBase /path/to/ontowiki/
</IfModule>
# if you allow short open tags, xml templates will crash
# please refer http://code.google.com/p/ontowiki/wiki/RecommendedPHPSettings
# for recommended PHP settings
# maybe php_flag is not allowed in your environment,
# but if you allow short open tags, xml templates will crash
#php_flag short_open_tag 0
### Additional Auth with external OntoWiki auth-script
### (more infos at http://code.google.com/p/mod-auth-external/)
#AuthType Basic
#AuthName OntoWiki
#AuthBasicProvider external
#AuthExternal ontowiki
#Require valid-user
### NOTE: This is needed to be included in /etc/apache2/mods-enabled/authnz_external.load or .conf
#DefineExternalAuth ontowiki pipe /path/to/ontowiki/application/scripts/mod-auth-external/ontowiki.php