How to Detect if the visitor is logging by mobile and turn him to index.php and when logging from PC turn him to index.html
is that by .htaccess or what?
How to Detect if the visitor is logging by mobile and turn him to index.php and when logging from PC turn him to index.html
is that by .htaccess or what?
You need to use some sort of information provided by the client to determine if the user is on a mobile device or not.
There any many ways to do this, for example in JavaScript
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
/* User is mobile... */
}
Which will check for a string used in a mobile device in the user agent.
There are libraries such as Modernizr (http://www.modernizr.com/) which have things like this to help you.
All in all, there's no set way to do it - you'll have to try different methods and choose the one you like.