diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-06-25 12:13:52 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-06-25 12:13:52 -0400 |
commit | 011386d8a134375c8349086272e82498f7796a6c (patch) | |
tree | 685a7778ab6986906d318ee6014b6ea21075118f /config | |
parent | 3da206a823e436f3a3ad5d44aa6daa7929bb6d6a (diff) | |
download | pfsense-packages-011386d8a134375c8349086272e82498f7796a6c.tar.gz pfsense-packages-011386d8a134375c8349086272e82498f7796a6c.tar.bz2 pfsense-packages-011386d8a134375c8349086272e82498f7796a6c.zip |
Ensure leading http(s):// and trailing / on additional hostnames
Diffstat (limited to 'config')
-rw-r--r-- | config/apache_mod_security/apache_mod_security.inc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc index 15550dd3..107e8b4f 100644 --- a/config/apache_mod_security/apache_mod_security.inc +++ b/config/apache_mod_security/apache_mod_security.inc @@ -218,8 +218,16 @@ EOF; if($config['installedpackages']['apachemodsecurity']) { foreach($config['installedpackages']['apachemodsecurity']['config'] as $ams) { // Set rowhelper used variables - foreach($ams['row'] as $row) - $additionalsitehostnames .= "{$row['additionalsitehostnames']} "; + foreach($ams['row'] as $row) { + if(!strstr($row['additionalsitehostnames'], "http")) + $additionalsitehostnames .= "http://"; + $additionalsitehostnames .= "{$row['additionalsitehostnames']}"; + // Ensure trailing / + if(substr($row['additionalsitehostnames'],count($row['additionalsitehostnames']),1) != "/") + $additionalsitehostnames .= "/ "; + else + $additionalsitehostnames .= " "; + } $backend_sites = ""; // not technically needed. added for readability due to .='s foreach($ams['row'] as $row) { // Ensure leading http(s):// |