I have got the following code to redirect IE users to my IE website version:
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') )
{
header( 'Location: http://www.web.com/ie/index.php' ) ;
}
(php tags not included).
But in the other hand I am trying to replace MSIE8
for more versions, and trying the following code does not work.
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6', 'MSIE 7', 'MSIE 8', 'MSIE 9', 'MSIE 10') )
{
header( 'Location: http://www.web.com/ie/index.php' ) ;
}
Also trying this one does not work:
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6, MSIE 7, MSIE 8, MSIE 9, MSIE 10') )
{
header( 'Location: http://www.web.com/ie/index.php' ) ;
}