Skip to content

Instantly share code, notes, and snippets.

@traviskroberts
Created January 21, 2009 21:38
Show Gist options
  • Select an option

  • Save traviskroberts/50219 to your computer and use it in GitHub Desktop.

Select an option

Save traviskroberts/50219 to your computer and use it in GitHub Desktop.
# Rewrite index to check for static
RewriteCond %{HTTP_USER_AGENT} !.*Mobile.*Safari
RewriteRule ^/$ /cache/index.html [QSA]
# Rewrite to check for Rails cached page
RewriteCond %{HTTP_USER_AGENT} !.*Mobile.*Safari
RewriteRule ^([^.]+)$ /cache/$1.html [QSA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment