This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.htaccess
51 lines (41 loc) · 1.6 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
51
<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
# Rewrite rules
# 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]
RewriteRule ^sharepoint/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ sharepoint.php?oid=$1&sid=$2&cid=$3&type=$4&fid=$5 [L,QSA]
# Teams
RewriteRule ^teams/?$ teams.php [NC,L]
RewriteRule ^teams/([^/]+)/?$ teams.php?oid=$1 [L,QSA]
RewriteRule ^teams/([^/]+)/([^/]+)/?$ teams.php?oid=$1&tid=$2 [L,QSA]
#RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Disable directory browsing, multiviews and enable follow symlinks
Options -Indexes -MultiViews +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>