From e50714e47c915d433958e14da165a0d6b0ffe5ee Mon Sep 17 00:00:00 2001 From: "Paul Buetow (mars.fritz.box)" Date: Sat, 22 Mar 2014 11:43:43 +0100 Subject: add hostname --- Xerl/Setup/Configure.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Xerl/Setup/Configure.pm') diff --git a/Xerl/Setup/Configure.pm b/Xerl/Setup/Configure.pm index d32511a..d01e5a5 100644 --- a/Xerl/Setup/Configure.pm +++ b/Xerl/Setup/Configure.pm @@ -61,6 +61,11 @@ sub defaults($) { $self->set_host( lc $ENV{HTTP_HOST} ) unless $self->host_exists(); + my ($hostname) = $ENV{HTTP_HOST} =~ /^(.*)\./; + + $self->set_hostname( lc $hostname ) + unless $self->hostname_exists(); + unless ( -d $self->get_hostroot() . $self->get_host() ) { my $redirect = $self->get_hostroot() . 'redirect:' . $self->get_host(); -- cgit v1.2.3