<meta HTTP-EQUIV="REFRESH" content="0; url=https://Mysite.com=">
<script type="text/javascript">
<!--
if (screen.width <= 1000) {
window.location = "https://MysiteForMobile.com";
}
//-->
</script>
<?php
require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect;
if($detect->isMobile()) {
header('Location: http://mobile.example1.com/'); // url of your mobile site or any different link
exit;
}