isaacsu/twich/master/www/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# gets rid of www prefix
RewriteCond %{HTTP_HOST} ^www.twich.me$ [NC]
RewriteRule ^(.*)$ http://twich.me/$1 [L,R=301]
# if it's empty, forward to default room
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* default [R,L]
RewriteCond %{HTTP_USER_AGENT} (iPod|iPhone|iPad|Android)
RewriteCond %{REQUEST_URI} !(.gif$)|(.jpg$)|(.png$)|(.css$)|(.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ iphone.php?room=$1 [L,QSA]
RewriteCond %{REQUEST_URI} !(.gif$)|(.jpg$)|(.png$)|(.css$)|(.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?room=$1 [L,QSA]
</IfModule>
On Github License
Files
Download PDF of Htaccess file