diff --git a/virtual_feature.pl b/virtual_feature.pl index f3a2d3f..c1de034 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -1975,17 +1975,6 @@ sub feature_create_web_balancer my $p = $balancer->{'path'}; if ($p ne '/') { $p =~ s/\/$//; - push(@{$l->{'members'}}, - { 'name' => 'rewrite', - 'words' => [ '^'.$p.'$', $p.'/', 'redirect' ], - }, - { 'name' => 'rewrite', - 'words' => [ '^'.$p.'(/.*)', '$1', 'break' ], - }, - { 'name' => 'proxy_redirect', - 'words' => [ $url, $p ], - }, - ); } push(@{$l->{'members'}}, { 'name' => 'proxy_pass', @@ -2077,25 +2066,6 @@ sub feature_modify_web_balancer &save_directive($l, "proxy_pass", \@urls); $url = @urls ? $urls[0] : undef; } -if (@urls && $balancer->{'path'} ne '/') { - # Add rewrites for the path - my $p = $balancer->{'path'}; - $p =~ s/\/$//; - &save_directive($l, 'rewrite', - { 'name' => 'rewrite', - 'words' => [ '^'.$p.'$', $p.'/', 'redirect' ], - }, - { 'name' => 'rewrite', - 'words' => [ '^'.$p.'(/.*)', '$1', 'break' ], - }, - { 'name' => 'proxy_redirect', - 'words' => [ $url, $p ], - }, - ); - } -else { - &save_directive($l, 'rewrite', [ ]); - } &flush_config_file_lines(); &unlock_all_config_files(); &virtual_server::register_post_action(\&print_apply_nginx);