I have a main website , I would like for users to connect to my sub domain , where my mobile page will be held.
please help
I have a main website , I would like for users to connect to my sub domain , where my mobile page will be held.
please help
You must check the user's agent and if it is a mobile device then redirect to the subdomain. You have got an example of how to do it in php in iamandrus response here:
Regards
New to all this but could you use something like
function isMobile() {
return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
}
if isMobile() {
//show mobile site maybe in a redirect?
}
else{
//Show normal site
}