diff options
| author | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2014-03-22 11:43:43 +0100 |
|---|---|---|
| committer | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2014-03-22 11:43:43 +0100 |
| commit | e50714e47c915d433958e14da165a0d6b0ffe5ee (patch) | |
| tree | 543074f4be1696cf0a4bf932ae8d280620338b52 /Xerl/Setup/Configure.pm | |
| parent | f179bb94b7c657e1ae238e91c1bb92596ee3de27 (diff) | |
add hostname
Diffstat (limited to 'Xerl/Setup/Configure.pm')
| -rw-r--r-- | Xerl/Setup/Configure.pm | 5 |
1 files changed, 5 insertions, 0 deletions
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(); |
