This repository was archived by the owner on Apr 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.htaccess
48 lines (39 loc) · 1.42 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
<IfModule mod_rewrite.c>
RewriteEngine On
# Rewrite rules
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^index/?$ index.php [NC,L]
RewriteRule ^api/?$ webapi/api.php?class=login&action=create [NC,L]
RewriteRule ^api/([^/]+)/?$ webapi/api.php?class=$1&action=list [L,QSA]
RewriteRule ^api/([^/]+)/([^/]+)/?$ webapi/api.php?class=$1&action=$2 [L,QSA]
# Exchange
RewriteRule ^exchange/?$ exchange.php [NC,L]
RewriteRule ^exchange/([^/]+)/?$ exchange.php?oid=$1 [L,QSA]
RewriteRule ^exchange/([^/]+)/([^/]+)/?$ exchange.php?oid=$1&uid=$2 [L,QSA]
# OneDrive
RewriteRule ^onedrive/?$ onedrive.php [NC,L]
RewriteRule ^onedrive/([^/]+)/?$ onedrive.php?oid=$1 [L,QSA]
RewriteRule ^onedrive/([^/]+)/([^/]+)/?$ onedrive.php?oid=$1&uid=$2 [L,QSA]
# SharePoint
RewriteRule ^sharepoint/?$ sharepoint.php [NC,L]
RewriteRule ^sharepoint/([^/]+)/?$ sharepoint.php?oid=$1 [L,QSA]
RewriteRule ^sharepoint/([^/]+)/([^/]+)/?$ sharepoint.php?oid=$1&sid=$2 [L,QSA]
RewriteRule ^sharepoint/([^/]+)/([^/]+)/([^/]+)/?$ sharepoint.php?oid=$1&sid=$2&cid=$3 [L,QSA]
RewriteRule ^sharepoint/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ sharepoint.php?oid=$1&sid=$2&cid=$3&type=$4 [L,QSA]
# Disable directory browsing
Options -Indexes
Options +FollowSymLinks
</IfModule>
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
<Files readme.md>
Order allow,deny
Deny from all
</Files>
<Files LICENSE>
Order allow,deny
Deny from all
</Files>