Skip to content

Instantly share code, notes, and snippets.

View gcarrion-gfrmedia's full-sized avatar

Guillermo Carrion gcarrion-gfrmedia

View GitHub Profile
@gcarrion-gfrmedia
gcarrion-gfrmedia / 0000_packages.config
Created April 29, 2014 10:49
AWS Elastic Beanstalk Ruby 2.0/Puma Environment - .ebextensions tweaks and Sidekiq configuration. This is known to work fine with AWS Elastic Beanstalk 's 64bit Amazon Linux 2014.03 v1.0.1 running Ruby 2.0 (Puma) stack. Later stack versions might not work, but for that specific version works fine.
# Install Git needed for Git based gems
packages:
yum:
git: []
@gcarrion-gfrmedia
gcarrion-gfrmedia / .htaccess
Created May 24, 2012 20:30
Add a trailing slash to requested urls
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !example.php
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://domain.com/$1/ [L,R=301]
# Source: http://enarion.net/web/htaccess/trailing-slash/
@gcarrion-gfrmedia
gcarrion-gfrmedia / remove www htaccess
Created May 13, 2012 15:29
remove www from your URL with Apache mod_rewrite
# Redirecting www version to non-www version
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>