Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@betweenbrain
Forked from ryanlindsey/gist:1332237
Created February 3, 2012 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betweenbrain/1731407 to your computer and use it in GitHub Desktop.
Save betweenbrain/1731407 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