From 790cb86a8f98ddcd5cc7cb109f2b6a990cd4814e Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Mon, 09 Apr 2012 18:54:00 -0400 Subject: [PATCH] - Make sure no rewrite rules are created if the redirect path is empty. --- server/plugins-available/nginx_plugin.inc.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 40ff358..d345ec5 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -778,7 +778,7 @@ // Rewrite rules $rewrite_rules = array(); - if($data['new']['redirect_type'] != '') { + if($data['new']['redirect_type'] != '' && $data['new']['redirect_path'] != '') { if(substr($data['new']['redirect_path'],-1) != '/') $data['new']['redirect_path'] .= '/'; if(substr($data['new']['redirect_path'],0,8) == '[scheme]') $data['new']['redirect_path'] = '$scheme'.substr($data['new']['redirect_path'],8); /* Disabled path extension @@ -834,7 +834,7 @@ } $app->log('Add server alias: '.$alias['domain'],LOGLEVEL_DEBUG); // Rewriting - if($alias['redirect_type'] != '') { + if($alias['redirect_type'] != '' && $alias['redirect_path'] != '') { if(substr($alias['redirect_path'],-1) != '/') $alias['redirect_path'] .= '/'; if(substr($alias['redirect_path'],0,8) == '[scheme]') $alias['redirect_path'] = '$scheme'.substr($alias['redirect_path'],8); -- Gitblit v1.9.1