Skip to content

Instantly share code, notes, and snippets.

@ryanlindsey
Created November 1, 2011 23:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ryanlindsey/1332237 to your computer and use it in GitHub Desktop.
Save ryanlindsey/1332237 to your computer and use it in GitHub Desktop.
.htaccess
AddDefaultCharSet utf-8
DefaultLanguage en-US
# Activate rewrite engine
Options +FollowSymLinks
RewriteEngine on
# Redirect to wwww
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
# Redirect to non-wwww
#RewriteCond %{HTTP_HOST} ^www\.example\.tld$ [NC]
#RewriteRule ^(.*)$ http://example.tld/$1 [R=301,L]
# MediaTemple PHP5
AddHandler php5-script .php
# Add mime-types
#AddType video/ogg .ogv
#AddType video/mp4 .mp4
#AddType video/webm .webm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment