Skip to content

Instantly share code, notes, and snippets.

@debracleaver
Last active October 6, 2016 18:47
Show Gist options
  • Save debracleaver/27f1fbfb44b169cb9973106992ca8816 to your computer and use it in GitHub Desktop.
Save debracleaver/27f1fbfb44b169cb9973106992ca8816 to your computer and use it in GitHub Desktop.
# ----------------------------------------------------------------------
# Begin wordpress
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------
# These are pretty far-future expires headers.
# They assume you control versioning with filename-based cache busting
# Additionally, consider that outdated proxies may miscache
# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
# If you don't use filenames to version, lower the CSS and JS to something like
# "access plus 1 week".
<IfModule mod_expires.c>
ExpiresActive on
# Default
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Your document html
ExpiresByType text/html "access plus 0 seconds"
# Data
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
# Feed
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 month"
# Media: images, video, audio
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/svg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# HTC files (css3pie)
ExpiresByType text/x-component "access plus 1 month"
# Webfonts
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
# CSS and Javascript
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/x-javascript "access plus 1 week"
</IfModule>
## END EXPIRE HEADERS
# ----------------------------------------------------------------------
# 301 Redirects
# ----------------------------------------------------------------------
Redirect 301 /alabama https://www.vote.org/state/alabama
Redirect 301 /alaska https://www.vote.org/state/alaska
Redirect 301 /arizona https://www.vote.org/state/arizona
Redirect 301 /arkasas https://www.vote.org/state/arkasas
Redirect 301 /california https://www.vote.org/state/california
Redirect 301 /colorado https://www.vote.org/state/colorado
Redirect 301 /connecticut https://www.vote.org/state/connecticut
Redirect 301 /delaware https://www.vote.org/state/delaware
Redirect 301 /district-of-columbia https://www.vote.org/state/district-of-columbia
Redirect 301 /florida https://www.vote.org/state/florida
Redirect 301 /georgia https://www.vote.org/state/georgia
Redirect 301 /hawaii https://www.vote.org/state/hawaii
Redirect 301 /idaho https://www.vote.org/state/idaho
Redirect 301 /illinois https://www.vote.org/state/illinois
Redirect 301 /indiana https://www.vote.org/state/indiana
Redirect 301 /iowa https://www.vote.org/state/iowa
Redirect 301 /kansas https://www.vote.org/state/kansas
Redirect 301 /kentucky https://www.vote.org/state/kentucky
Redirect 301 /louisiana https://www.vote.org/state/louisiana
Redirect 301 /maine https://www.vote.org/state/maine
Redirect 301 /maryland https://www.vote.org/state/maryland
Redirect 301 /massachusetts https://www.vote.org/state/massachusetts
Redirect 301 /michigan https://www.vote.org/state/michigan
Redirect 301 /minnesota https://www.vote.org/state/minnesota
Redirect 301 /mississippi https://www.vote.org/state/mississippi
Redirect 301 /missouri https://www.vote.org/state/missouri
Redirect 301 /montana https://www.vote.org/state/montana
Redirect 301 /nebraska https://www.vote.org/state/nebraska
Redirect 301 /nevada https://www.vote.org/state/nevada
Redirect 301 /new-hampshire https://www.vote.org/state/new-hampshire
Redirect 301 /new-jersey https://www.vote.org/state/new-jersey
Redirect 301 /new-mexico https://www.vote.org/state/new-mexico
Redirect 301 /new-york https://www.vote.org/state/new-york
Redirect 301 /north-carolina https://www.vote.org/state/north-carolina
Redirect 301 /north-dakota https://www.vote.org/state/north-dakota
Redirect 301 /ohio https://www.vote.org/state/ohio
Redirect 301 /oklahoma https://www.vote.org/state/oklahoma
Redirect 301 /oregon https://www.vote.org/state/oregon
Redirect 301 /pennyslvania https://www.vote.org/state/pennyslvania
Redirect 301 /rhode-island https://www.vote.org/state/rhode-island
Redirect 301 /south-carolina https://www.vote.org/state/south-carolina
Redirect 301 /south-dakota https://www.vote.org/state/south-dakota
Redirect 301 /tennessee https://www.vote.org/state/tennessee
Redirect 301 /texas https://www.vote.org/state/texas
Redirect 301 /utah https://www.vote.org/state/utah
Redirect 301 /vermont https://www.vote.org/state/vermont
Redirect 301 /virginia https://www.vote.org/state/virginia
Redirect 301 /washington https://www.vote.org/state/washington
Redirect 301 /west-virginia https://www.vote.org/state/west-virginia
Redirect 301 /wisconsin https://www.vote.org/state/wisconsin
Redirect 301 /wyoming https://www.vote.org/state/wyoming
Redirect 301 /early_voting_rules https://www.vote.org/early-voting-calendar/
Redirect 301 /absentee_ballots https://www.vote.org/absentee-ballot/
Redirect 301 /absentee-ballots https://www.vote.org/absentee-ballot/
Redirect 301 /forms https://www.vote.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment