Skip to content

Instantly share code, notes, and snippets.

@bearice
Created March 2, 2012 01:12
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 bearice/1954462 to your computer and use it in GitHub Desktop.
Save bearice/1954462 to your computer and use it in GitHub Desktop.
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !=m.moegirl.org
RewriteCond %{HTTP_USER_AGENT} .*iPhone.* [OR]
RewriteCond %{HTTP_USER_AGENT} .*Android.* [OR]
RewriteCond %{HTTP_USER_AGENT} .*SymbianOS.* [OR]
RewriteCond %{HTTP_USER_AGENT} .*Windows\ Phone.*
RewriteRule ^(.*)$ http://m.moegirl.org/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php?title=$1 [PT,QSA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment