From e64fbbc9ba646207fa14eb716444d3db1fc87406 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Tue, 20 Sep 2011 07:10:08 -0400
Subject: [PATCH] - Added redirects for nginx. - Added SEO redirects (both Apache & nginx) to redirect from non-www website to www website or vice versa. - Introduced placeholder [scheme] for redirect paths for alias and subdomains; will be replaced with http or https, depending on what the visitor uses.
---
interface/web/sites/form/web_domain.tform.php | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/interface/web/sites/form/web_domain.tform.php b/interface/web/sites/form/web_domain.tform.php
index 29952e7..2068391 100644
--- a/interface/web/sites/form/web_domain.tform.php
+++ b/interface/web/sites/form/web_domain.tform.php
@@ -231,12 +231,12 @@
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '',
- 'value' => array('' => 'no_redirect_txt', 'no' => 'no_flag_txt', 'R' => 'R', 'L' => 'L', 'R,L' => 'R,L')
+ 'value' => array('' => 'no_redirect_txt', 'no' => 'no_flag_txt', 'R' => 'R', 'L' => 'L', 'R,L' => 'R,L', 'last' => 'last', 'break' => 'break', 'redirect' => 'redirect', 'permanent' => 'permanent')
),
'redirect_path' => array (
'datatype' => 'VARCHAR',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
+ 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
'errmsg'=> 'redirect_error_regex'),
),
'formtype' => 'TEXT',
@@ -244,6 +244,12 @@
'value' => '',
'width' => '30',
'maxlength' => '255'
+ ),
+ 'seo_redirect' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'default' => '',
+ 'value' => array('' => 'no_redirect_txt', 'non_www_to_www' => 'non_www_to_www_txt', 'www_to_non_www' => 'www_to_non_www_txt')
),
##################################
# ENDE Datatable fields
@@ -485,9 +491,9 @@
'php_open_basedir' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
+ /*'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'php_open_basedir_error_empty'),
- ),
+ ), */
'default' => 'All',
'value' => '',
'width' => '30',
@@ -509,6 +515,14 @@
'width' => '30',
'maxlength' => '255'
),
+ 'nginx_directives' => array (
+ 'datatype' => 'TEXT',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '30',
+ 'maxlength' => '255'
+ )
##################################
# ENDE Datatable fields
##################################
--
Gitblit v1.9.1