From 52581ba876f6e460fc4a1a777add0954dd38e85e Mon Sep 17 00:00:00 2001 From: "D. V. Serg" Date: Wed, 17 Dec 2008 05:45:56 +0000 Subject: Fix rewrites --- packages/squidGuard/squidguard_configurator.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/squidGuard/squidguard_configurator.inc b/packages/squidGuard/squidguard_configurator.inc index b359fa0a..0f6eec45 100644 --- a/packages/squidGuard/squidguard_configurator.inc +++ b/packages/squidGuard/squidguard_configurator.inc @@ -851,7 +851,7 @@ function sg_create_config() if (is_array($rew[FLD_ITEM])) { foreach ($rew[FLD_ITEM] as $rw) - $sg_tag->items[] = "s@.{$rw[FLD_TARGETURL]}@{$rw[FLD_REPLACETO]}@r"; + $sg_tag->items[] = "s@{$rw[FLD_TARGETURL]}@{$rw[FLD_REPLACETO]}@r"; if ($rew[FLD_LOG]) $sg_tag->items[] = "log " . SQUIDGUARD_ACCESSBLOCK_FILE; @@ -955,6 +955,8 @@ function sg_create_config() $sg_tag_def->items[] = "pass {$def[FLD_DESTINATIONNAME]}"; if ($def[FLD_RMOD] !== RMOD_NONE) $sg_tag_def->items[] = "redirect " . sg_redirector_base_url($def[FLD_REDIRECT], $def[FLD_RMOD]); + if ($def[FLD_REWRITENAME]) + $sg_tag_def->items[] = "rewrite {$def[FLD_REWRITENAME]}"; if ($def[FLD_LOG]) $sg_tag_def->items[] = "log " . SQUIDGUARD_ACCESSBLOCK_FILE; -- cgit v1.2.3