From 23efa13ccfec0cb3915f4c9656e11d1254f721e7 Mon Sep 17 00:00:00 2001 From: "paul (uranus)" Date: Sun, 1 Jan 2017 12:59:25 +0000 Subject: add support for redirection even for alias hosts --- Xerl/Setup/Configure.pm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Xerl/Setup/Configure.pm b/Xerl/Setup/Configure.pm index 8f19f80..406df9c 100644 --- a/Xerl/Setup/Configure.pm +++ b/Xerl/Setup/Configure.pm @@ -66,17 +66,6 @@ sub defaults { my $host = $self->get_host(); unless ( -d $self->get_hostroot() . $host ) { - my $redirect = $self->get_hostroot() . 'redirect:' . $host; - - if ( -f $redirect ) { - my $file = Xerl::Tools::FileIO->new( 'path' => $redirect ); - $file->fslurp(); - - my $location = $file->shift(); - Xerl::Main::Global::REDIRECT($location); - $self->set_finish_request(1); - } - my $alias = $self->get_hostroot() . 'alias:' . $host; my $alias_host = ''; @@ -94,6 +83,17 @@ sub defaults { $self->set_host( $alias_host ); } + + my $redirect = $self->get_hostroot() . 'redirect:' . $self->get_host(); + + if ( -f $redirect ) { + my $file = Xerl::Tools::FileIO->new( 'path' => $redirect ); + $file->fslurp(); + + my $location = $file->shift(); + Xerl::Main::Global::REDIRECT($location); + $self->set_finish_request(1); + } } $self->set_outputformat( $self->get_defaultoutputformat() ) -- cgit v1.2.3