summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul (uranus) <paul@buetow.org>2017-01-01 12:59:25 +0000
committerpaul (uranus) <paul@buetow.org>2017-01-01 12:59:25 +0000
commit23efa13ccfec0cb3915f4c9656e11d1254f721e7 (patch)
tree32fe201b600929da3abf036441ad37d585090db1
parenta0202a13efbfe18c99e64e3e3b95d39cd65fbffe (diff)
add support for redirection even for alias hosts
-rw-r--r--Xerl/Setup/Configure.pm22
1 files 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() )