-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess
49 lines (36 loc) · 2.57 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
RewriteEngine On
#REST api
RewriteRule ^(.*)/api/(.*)$ $1/api/index.php?rewrite_uri=$2 [QSA]
# $mac or $mac.cfg/xml
RewriteRule ^.*([A-Fa-f0-9]{12})(?:\.xml|\.cfg)?$ app/provision/index.php?mac=$1 [QSA]
# $m:a:c or $m:a:c.cfg/xml
RewriteRule ^.*((?:[A-Fa-f0-9]{2}[:-]){5}[A-Fa-f0-9]{2})(?:\.xml|\.cfg)?$ app/provision/index.php?mac=$1 [QSA]
# kt*-$mac.xml
RewriteRule ^kt.*?-([A-Fa-f0-9]{12})\.xml$ app/provision/index.php?mac=$1 [QSA]
# cfg-$mac.xml
RewriteRule ^.*cfg([A-Fa-f0-9]{12})\.xml$ app/provision/index.php?mac=$1 [QSA]
#Snom m3
RewriteRule ^m3/settings/([A-Fa-f0-9]{12})(?:\.cfg)?$ app/provision/index.php?mac=$1 [QSA]
#Grandstream
RewriteRule ^.*/cfg([A-Fa-f0-9]{12})(?:\.xml|\.cfg)?$ app/provision/?mac=$1 [QSA]
#Yealink and Polycom
RewriteRule ^.*/([A-Fa-f0-9]{12})(?:\.xml|\.cfg)?$ app/provision/index.php?mac=$1 [QSA]
#Polycom
RewriteRule ^provision/000000000000.cfg$ app/provision/?mac=$1&file={$mac}.cfg [QSA]
RewriteRule ^provision/features.cfg$ app/provision/?mac=$1&file=features.cfg [QSA]
RewriteRule ^provision/([A-Fa-f0-9]{12})-sip.cfg$ app/provision/?mac=$1&file=sip.cfg [QSA]
RewriteRule ^provision/([A-Fa-f0-9]{12})-phone.cfg$ app/provision/?mac=$1 [QSA]
RewriteRule ^provision/([A-Fa-f0-9]{12})-registration.cfg$ app/provision/?mac=$1&file={$mac}-registration.cfg [QSA]
RewriteRule ^provision/([A-Fa-f0-9]{12})-site.cfg$ app/provision/?mac=$1&file=site.cfg [QSA]
RewriteRule ^provision/([A-Fa-f0-9]{12})-web.cfg$ app/provision/?mac=$1&file=web.cfg [QSA]
RewriteRule ^provision/([A-Fa-f0-9]{12})-directory.xml$ app/provision/?mac=$1&file=directory.xml [QSA]
#Escene
RewriteRule ^.*/([0-9]{1,11})_Extern.xml$ app/provision/?ext=$1&file={$mac}_extern.xml [QSA]
RewriteRule ^.*/([0-9]{1,11})_Phonebook.xml$ app/provision/?ext=$1&file={$mac}_phonebook.xml [QSA]
#Aastra
RewriteRule ^provision/aastra.cfg$ app/provision/index.php?file=aastra.cfg [QSA]
Options -Indexes
#PHP settings
php_value upload_max_filesize 25M
php_value post_max_size 35M
php_value memory_limit 512M