Skip to content

Instantly share code, notes, and snippets.

View gordonknoppe's full-sized avatar

Gordon Knoppe gordonknoppe

  • Magento
  • Dublin, Ireland
View GitHub Profile
@gordonknoppe
gordonknoppe / mod_rewrite_rules
Created November 17, 2012 20:46 — forked from phillipadsmith/mod_rewrite_rules
Mobile site redirection using mod_rewrite
RewriteEngine On
# If the user is asking for the fullsite, set a cookie, remove the query, and stop.
RewriteCond %{QUERY_STRING} ^fullsite$
RewriteRule ^/?(.*)$ http://domain.com/$1? [L,CO=fullsite:yes:.domain.com]
# If the user is asking for the mobilesite, set a cookie, remove the query, redirect and stop.
RewriteCond %{QUERY_STRING} ^mobilesite$
RewriteRule ^/?(.*)$ http://m.domain.com/$1? [L,CO=fullsite:no:.domain.com]
#/bin/sh
####################################################################################
# Magento Auto Snapshot
#
# Shell script that makes a backup of Magento's database and media directories.
# Intended for use on development environments. Bring new developers up to speed
# quickly.
# Makes some assumptions regarding Capistrano style deploy path.
#
# You are responsible for your own security!!!!!