forked from phpipam/phpipam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
42 lines (33 loc) · 1.27 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
<IfModule mod_rewrite.c>
# apache auth basic auth example
#AuthUserFile /path/to/.htpasswd
#AuthName "phpIPAM authentication"
#AuthType Basic
#require valid-user
RewriteEngine on
# change rewrite base if not in root
# RewriteBase /
# passthroughs
RewriteRule ^api/.$ - [L]
RewriteRule ^index.php$ - [L]
RewriteRule ^(css|js|site|test)/.*$ - [L]
RewriteRule app/login/captcha/captchashow.php - [L]
# redirect errors
ErrorDocument 400 /error/400/
ErrorDocument 401 /error/401/
ErrorDocument 403 /error/403/
ErrorDocument 404 /error/404/
ErrorDocument 500 /error/500/
# IE login dashboard fix
RewriteRule ^login/dashboard/$ dashboard/ [R]
RewriteRule ^logout/dashboard/$ dashboard/ [R]
# search override
RewriteRule ^tools/search/(.*)$ index.php?page=tools§ion=search&ip=$1 [L]
# Rewrites
RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/$ index.php?page=$1§ion=$2&subnetId=$3&sPage=$4&ipaddrid=$5&tab=$6 [L]
RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/$ index.php?page=$1§ion=$2&subnetId=$3&sPage=$4&ipaddrid=$5 [L]
RewriteRule ^(.*)/(.*)/(.*)/(.*)/$ index.php?page=$1§ion=$2&subnetId=$3&sPage=$4 [L]
RewriteRule ^(.*)/(.*)/(.*)/$ index.php?page=$1§ion=$2&subnetId=$3 [L]
RewriteRule ^(.*)/(.*)/$ index.php?page=$1§ion=$2 [L,QSA]
RewriteRule ^(.*)/$ index.php?page=$1 [L]
</IfModule>