summaryrefslogtreecommitdiff
path: root/templates/vhosts
diff options
context:
space:
mode:
authorAndreas <andreas@immerda.ch>2010-01-27 22:35:04 +0100
committerAndreas <andreas@immerda.ch>2010-01-27 22:35:04 +0100
commit7845bec2e327f0ef7117847a868fc72cdc430e69 (patch)
treef4be014f311c70fc6503684d47d1f133d34c9255 /templates/vhosts
parent60bb08e7cc39c9e7cd0d07e8b10db62ca9f8e8be (diff)
silverstripe htaccess errors
Diffstat (limited to 'templates/vhosts')
-rw-r--r--templates/vhosts/php_silverstripe/CentOS.erb60
1 files changed, 37 insertions, 23 deletions
diff --git a/templates/vhosts/php_silverstripe/CentOS.erb b/templates/vhosts/php_silverstripe/CentOS.erb
index df9df82..7adbf42 100644
--- a/templates/vhosts/php_silverstripe/CentOS.erb
+++ b/templates/vhosts/php_silverstripe/CentOS.erb
@@ -17,6 +17,9 @@
<%- if ssl_mode.to_s == 'force' then -%>
Redirect permanent / https://<%= servername %>/
<%- end -%>
+ # silverstripe
+ RedirectMatch /admin(.*) https://<%= servername %>.ch/admin$1
+ RedirectMatch /Security(.*) https://<%= servername %>/Security$1
<%- if default_charset.to_s != 'absent' then -%>
AddDefaultCharset <%= default_charset %>
<%- end -%>
@@ -48,26 +51,26 @@
<%- unless php_safe_mode_exec_bins.to_s == 'absent' then -%>
php_admin_value safe_mode_exec_dir <%= real_php_safe_mode_exec_bin_dir %>
<%- end -%>
+
+ # silverstripe .htaccess
+ <Files *.ss>
+ Order deny,allow
+ Deny from all
+ #Allow from 127.0.0.1
+ </Files>
+ <IfModule mod_rewrite.c>
+ RewriteEngine On
+ #RewriteBase /
+
+ RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
+
+ RewriteCond %{REQUEST_URI} ^(.*)$
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
+ </IfModule>
</Directory>
<%- end -%>
- <Files *.ss>
- Order deny,allow
- Deny from all
- #Allow from 127.0.0.1
- </Files>
-
- <IfModule mod_rewrite.c>
- RewriteEngine On
- RewriteBase /
-
- RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
-
- RewriteCond %{REQUEST_URI} ^(.*)$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
- </IfModule>
-
<IfModule mod_security2.c>
<%- if mod_security.to_s == 'true' then -%>
SecRuleEngine On
@@ -138,14 +141,25 @@
<%- end -%>
# turn allow_url_fopen on for the extension manager fetch
php_admin_value allow_url_fopen On
+
+ # silverstripe .htaccess
+ <Files *.ss>
+ Order deny,allow
+ Deny from all
+ #Allow from 127.0.0.1
+ </Files>
+ <IfModule mod_rewrite.c>
+ RewriteEngine On
+ #RewriteBase /
+
+ RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
+
+ RewriteCond %{REQUEST_URI} ^(.*)$
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
+ </IfModule>
</Directory>
- <Files *.ss>
- Order deny,allow
- Deny from all
- #Allow from 127.0.0.1
- </Files>
-
<IfModule mod_security2.c>
<%- if mod_security.to_s == 'true' then -%>
SecRuleEngine On