mirror of
https://gitlab.com/hacklab01/pivilion.git
synced 2026-08-07 00:18:23 +00:00
Fix captive portal detection and restore MOTD
This commit is contained in:
parent
3b7a16564b
commit
34b4c4b036
9 changed files with 153 additions and 59 deletions
|
|
@ -1,17 +1,11 @@
|
|||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_URI} !(\/index\.php)$
|
||||
RewriteCond %{REQUEST_URI} !(\/pi-logo_128\.png)$
|
||||
RewriteCond %{REQUEST_URI} !(\/content\/.*)$
|
||||
RewriteCond %{REQUEST_URI} !(\/index\.php)$
|
||||
RewriteCond %{REQUEST_URI} !(\/pi-logo_128\.png)$
|
||||
RewriteCond %{REQUEST_URI} !(\/content\/.*)$
|
||||
RewriteCond %{REQUEST_URI} !(\/css\/.*)$
|
||||
RewriteCond %{REQUEST_URI} !(\/doc\/.*)$
|
||||
RewriteCond %{REQUEST_URI} !(\/docker\/.*)$
|
||||
RewriteCond %{REQUEST_URI} !(\/img\/.*)$
|
||||
RewriteCond %{REQUEST_URI} !(\/js\/.*)$
|
||||
RewriteCond %{REQUEST_URI} !(\/modules\/.*)$
|
||||
RewriteCond %{REQUEST_URI} !(\/tests\/.*)$
|
||||
RewriteCond %{REQUEST_URI} !(\/*.php)$
|
||||
RewriteCond %{REQUEST_URI} !(\/*.head.*)$
|
||||
RewriteRule ^(.*)$ http://10.1.1.1/index.php [L,R=301]
|
||||
|
||||
# Captive-network probes use otherwise unknown paths such as /generate_204,
|
||||
# /hotspot-detect.html, and /connecttest.txt. Redirect those temporarily so
|
||||
# clients open their login assistant, but let the gallery serve its own PHP and
|
||||
# asset paths without a loop.
|
||||
RewriteCond %{REQUEST_URI} !\.php$ [NC]
|
||||
RewriteCond %{REQUEST_URI} !\.head(?:\.|$) [NC]
|
||||
RewriteCond %{REQUEST_URI} !^/(?:content|css|doc|docker|img|images|js|modules|tests|upload)(?:/|$) [NC]
|
||||
RewriteCond %{REQUEST_URI} !^/pi-logo_128\.png$ [NC]
|
||||
RewriteRule ^ http://10.1.1.1/index.php [L,R=302,NE]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue