Skip to content

Instantly share code, notes, and snippets.

@josephabrahams
Last active July 19, 2018 22:21
Show Gist options
  • Save josephabrahams/81f3ecee09246405167ec751e5911760 to your computer and use it in GitHub Desktop.
Save josephabrahams/81f3ecee09246405167ec751e5911760 to your computer and use it in GitHub Desktop.
Redirect Pi-hole home page when accessing from hostname
# /etc/lighttpd/external.conf
$HTTP["host"] == "pi.hole" {
# Ensure the Pi-hole Block Page knows that this is not a blocked domain
setenv.add-environment = ("fqdn" => "true")
# Redirect homepage to "/admin/"
$HTTP["url"] == "/" {
url.redirect = ( "" => "/admin/" )
}
}
@josephabrahams
Copy link
Author

sudo service lighttpd restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment