Skip to content

Instantly share code, notes, and snippets.

@ryanbattles
ryanbattles / htaccess
Created December 16, 2011 21:06
A Standard .htaccess for use on most ExpressionEngine sites
FileETag None
<IfModule mod_rewrite.c>
RewriteEngine On
# Force www
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com$1 [R=301,L]
# Uncomment to Remove www, but comment the above 2 lines out. :)
# Otherwise the world will end
@ryanbattles
ryanbattles / config.php
Created September 14, 2011 14:13
A config.php file for ExpressionEngine 2.x that allows for multiple server environments.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| ExpressionEngine Config Items
|--------------------------------------------------------------------------
|
| The following items are for use with ExpressionEngine. The rest of
| the config items are for use with CodeIgniter, some of which are not
| observed by ExpressionEngine, e.g. 'permitted_uri_chars'
@ryanbattles
ryanbattles / database.php
Created September 14, 2011 13:59
A database.php file for ExpressionEngine 2.x that allows for multiple server environments.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
if ($_SERVER['SERVER_ADDR'] == '') {
$active_group = 'staging';
} elseif ($_SERVER['SERVER_ADDR'] == '208.73.210.85') { /* using qa-zone.com */
$active_group = 'production';
} else {
$active_group = 'development';
}
$active_record = TRUE;