Skip to content

Instantly share code, notes, and snippets.

@lucas-pelton
Created November 11, 2016 00:48
Show Gist options
  • Save lucas-pelton/163d972aab895266618e342b43477e72 to your computer and use it in GitHub Desktop.
Save lucas-pelton/163d972aab895266618e342b43477e72 to your computer and use it in GitHub Desktop.
Silent rewrite to grab static content based on subdomain
<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|ipad|iemobile" [NC]
# RewriteCond %{HTTP_COOKIE} !atomic-show-full-site=true [NC]
RewriteCond %{SERVER_NAME} ^m.thisisatotal.cf$ [NC]
RewriteCond %{REQUEST_FILENAME} !^favicon.ico$ [NC]
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule ^ /mobile.html [NC,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment