Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update htaccess to simplified version for pagoda box usage

  • Loading branch information...
commit bc341f83fde7def89c3089f52d23742cf27d9c43 1 parent 95e8111
@bobeagan bobeagan authored
Showing with 9 additions and 44 deletions.
  1. +9 −44 httpdocs/.htaccess
View
53 httpdocs/.htaccess
@@ -1,53 +1,11 @@
# Turn on URL rewriting
RewriteEngine On
-# Set the project name to use through the rest of this file
-RewriteRule .* - [E=PROJECTNAME:projecttemplate]
-
-# Force to always use the domain without the 'www' prefix (non-ssl)
-RewriteCond %{ENV:PROJECTNAME},%{HTTP_HOST} ^([^,]+),www\.\1
-RewriteRule ^(.*)$ http://%{ENV:PROJECTNAME}/$1 [R=301,L]
+RewriteRule .* - [E=REWRITEBASE:/]
# Set Development environment based on domain
RewriteCond %{HTTP_HOST} ^dev.vm$
-RewriteCond %{ENV:PROJECTNAME},%{REQUEST_URI} ^([^,]+),/\1
-RewriteRule .* - [E=KOHANA_ENV:development]
-
-# Set QA environment based on domain
-RewriteCond %{HTTP_HOST} ^qa.synsit.es$
-RewriteCond %{ENV:PROJECTNAME},%{REQUEST_URI} ^([^,]+),/\1
-RewriteRule .* - [E=KOHANA_ENV:qa]
-
-# Set Staging environment based on domain
-RewriteCond %{HTTP_HOST} ^demo.synsit.es$
-RewriteCond %{ENV:PROJECTNAME},%{REQUEST_URI} ^([^,]+),/\1
-RewriteRule .* - [E=KOHANA_ENV:staging]
-
-# Set Beta environment based on domain
-RewriteCond %{ENV:PROJECTNAME},%{HTTP_HOST} ^([^,]+),beta\.\1
-RewriteRule .* - [E=KOHANA_ENV:beta]
-
-# Set Production environment based on domain
-RewriteCond %{ENV:PROJECTNAME},%{HTTP_HOST} ^([^,]+),\1
-RewriteRule .* - [E=KOHANA_ENV:production]
-
-# Installation directory
-RewriteCond %{ENV:KOHANA_ENV} !development
-RewriteCond %{ENV:KOHANA_ENV} !qa
-RewriteCond %{ENV:KOHANA_ENV} !staging
-RewriteRule .* - [E=REWRITEBASE:/]
-
-# Development Installation directory
-RewriteCond %{ENV:KOHANA_ENV} development
-RewriteRule .* - [E=REWRITEBASE:/%{ENV:PROJECTNAME}/]
-
-# QA Installation directory
-RewriteCond %{ENV:KOHANA_ENV} qa
-RewriteRule .* - [E=REWRITEBASE:/%{ENV:PROJECTNAME}/]
-
-# Staging Installation directory
-RewriteCond %{ENV:KOHANA_ENV} staging
-RewriteRule .* - [E=REWRITEBASE:/%{ENV:PROJECTNAME}/]
+RewriteRule .* - [E=REWRITEBASE:/@TODO:project-directory-goes-here/]
# Protect hidden files from being viewed
<Files .*>
@@ -55,6 +13,13 @@ RewriteRule .* - [E=REWRITEBASE:/%{ENV:PROJECTNAME}/]
Deny From All
</Files>
+# Force to always use the HTTPS domain without the 'www' prefix (ssl)
+RewriteCond %{HTTP_HOST} ^([^,]+),www\.\1
+RewriteRule ^(.*)$ https://%{HTTP_HOST}%{ENV:REWRITEBASE}$1 [R=301,L]
+
+RewriteCond %{HTTP:X-Forwarded-Proto} =http
+RewriteRule ^(.*)$ https://%{HTTP_HOST}%{ENV:REWRITEBASE}$1 [R=301,L]
+
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Please sign in to comment.
Something went wrong with that request. Please try again.