-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
79 lines (65 loc) · 2.72 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
RewriteEngine on
# change rewrite base if not in root
RewriteBase /ipman/
# api
RewriteRule ^(api)($|/) - [L]
# index.php
RewriteRule ^index.php$ - [L]
# pass-through
RewriteRule ^(css|js|site)/.*$ - [L]
# redirect errors
ErrorDocument 400 /error/400/
ErrorDocument 401 /error/401/
ErrorDocument 403 /error/403/
ErrorDocument 404 /error/404/
ErrorDocument 500 /error/500/
RewriteRule ^error/(.*)/$ index.php?page=error&eid=$1 [L]
# login
RewriteRule ^login$ login/ [R]
RewriteRule ^login/$ index.php?page=login
# logout
RewriteRule ^logout$ logout/ [R]
RewriteRule ^logout/$ index.php?page=logout
# ip requests
RewriteRule ^request_ip$ request_ip/ [R]
RewriteRule ^request_ip/$ index.php?page=request_ip
# IE fix
RewriteRule ^login/dashboard/$ dashboard/ [R]
RewriteRule ^logout/dashboard/$ dashboard/ [R]
# upgrade
RewriteRule ^upgrade$ upgrade/ [R]
RewriteRule ^upgrade/$ index.php?page=upgrade
# install
RewriteRule ^install$ install/ [R]
RewriteRule ^install/$ index.php?page=install
# dashboard
RewriteRule ^dashboard/$ index.php?page=dashboard
# widgets
RewriteRule ^widgets/(.*)/$ index.php?page=widgets&subpage=$1
# subnets
RewriteRule ^subnets/(.*)/(.*)/ipdetails/(.*)/$ index.php?page=subnets§ion=$1&subnetId=$2&ipaddrid=$3 [L]
RewriteRule ^subnets/(.*)/(.*)/changelog/$ index.php?page=subnets§ion=$1&subnetId=$2&sPage=changelog [L]
RewriteRule ^subnets/(.*)/(.*)/(.*)/$ index.php?page=subnets§ion=$1&subnetId=$2&sPage=$3 [L]
RewriteRule ^subnets/(.*)/(.*)/$ index.php?page=subnets§ion=$1&subnetId=$2 [L]
RewriteRule ^subnets/(.*)/$ index.php?page=subnets§ion=$1 [L]
# folders
RewriteRule ^folder/(.*)/(.*)/$ index.php?page=folder§ion=$1&subnetId=$2 [L]
RewriteRule ^folder/(.*)/$ index.php?page=folder§ion=$1 [L]
# vlans
RewriteRule ^vlan/(.*)/(.*)/$ index.php?page=vlan§ion=$1&vlanId=$2 [L]
# vrfs
RewriteRule ^vrf/(.*)/(.*)/$ index.php?page=vrf§ion=$1&vrfId=$2 [L]
# changelog override
RewriteRule ^tools/changelog/(.*)/(.*)/$ index.php?page=tools&toolsId=changelog&cfilter=$1&climit=$2 [L]
RewriteRule ^tools/changelog/(.*)/$ index.php?page=tools&toolsId=changelog&climit=$1 [L]
# search override
RewriteRule ^tools/search/(.*)$ index.php?page=tools&toolsId=search&ip=$1 [L]
# devices override
RewriteRule ^tools/devices/hosts/(.*)$ index.php?page=tools&toolsId=devices&deviceid=$1 [L]
# tools
RewriteRule ^tools/(.*)/$ index.php?page=tools&toolsId=$1 [L]
RewriteRule ^tools/$ index.php?page=tools&toolsId=showAll [L]
# admin
RewriteRule ^administration/manageSection/sectionChangelog/(.*)/$ index.php?page=administration&adminId=sectionChangelog§ionId=$1 [L]
RewriteRule ^administration/(.*)/$ index.php?page=administration&adminId=$1 [L]
RewriteRule ^administration/$ index.php?page=administration&adminId=showAll [L]