Skip to content

Instantly share code, notes, and snippets.

@nbriz
Last active August 29, 2015 13:57
Show Gist options
  • Save nbriz/9601714 to your computer and use it in GitHub Desktop.
Save nbriz/9601714 to your computer and use it in GitHub Desktop.
mobile/desktop index redirect php
<?php
if( preg_match('/iphone|android/i', $_SERVER['HTTP_USER_AGENT']) ) {
include('index-mobile.html');
}
else {
include('index-desktop.html');
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment