From 7845bec2e327f0ef7117847a868fc72cdc430e69 Mon Sep 17 00:00:00 2001 From: Andreas Date: Wed, 27 Jan 2010 22:35:04 +0100 Subject: silverstripe htaccess errors --- templates/vhosts/php_silverstripe/CentOS.erb | 60 +++++++++++++++++----------- 1 file changed, 37 insertions(+), 23 deletions(-) (limited to 'templates/vhosts/php_silverstripe') 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 + + Order deny,allow + Deny from all + #Allow from 127.0.0.1 + + + 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] + <%- end -%> - - Order deny,allow - Deny from all - #Allow from 127.0.0.1 - - - - 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] - - <%- 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 + + Order deny,allow + Deny from all + #Allow from 127.0.0.1 + + + 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] + - - Order deny,allow - Deny from all - #Allow from 127.0.0.1 - - <%- if mod_security.to_s == 'true' then -%> SecRuleEngine On -- cgit v1.2.3