forked from phpipam/phpipam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
54 lines (45 loc) · 1.79 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
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
<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
# also add prefix to ErrorDocument
# 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 /app/error/index.php
ErrorDocument 401 /app/error/index.php
ErrorDocument 403 /app/error/index.php
ErrorDocument 404 /app/error/index.php
ErrorDocument 500 /app/error/index.php
# 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>