-
-
Notifications
You must be signed in to change notification settings - Fork 91
/
.htaccess
21 lines (16 loc) · 791 Bytes
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$0 [L]
# TODO: specific for main instance of OpenML site. Should do something better
#RewriteCond %{HTTP_HOST} ^api_new.openml.org
#RewriteRule ^(.*)$ http://www.openml.org/api_new/$1 [L,P]
#RewriteCond %{HTTPS_HOST} ^api_new.openml.org
#RewriteRule ^(.*)$ https://www.openml.org/api_new/$1 [L,P]
#RewriteCond $1 !^(questions|SWF|img|docs|downloads|GFX|favicon\.ico|tiny_mce|index\.php|js|css|robots\.txt)
#RewriteRule ^(.*)$ index.php/$1 [L]
RedirectMatch 301 ^/?$ http://api.openml.org/home
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"
</IfModule>