detect browser being used and redirect

by ronr
2 replies
  • WEB DESIGN
  • |
Where can I get the code to use if someone comes to a webpage from IE browser and if so direct them to another webpage?

Thanks,

Ron
#browser #detect #redirect
  • Profile picture of the author ALicenseToCode
    Originally Posted by ronr View Post

    Where can I get the code to use if someone comes to a webpage from IE browser and if so direct them to another webpage?

    Thanks,

    Ron
    You can do this easily through PHP, the supervariable $_SERVER stores the users browser. You can see it easily with a code like this <?php echo $_SERVER['HTTP_USER_AGENT']; ?> You'll just need to write a little more code on top of that to check if user agent is in there and then redirect accordingly.
    {{ DiscussionBoard.errors[6627494].message }}
    • Profile picture of the author ronr
      Thanks I appreciate it
      {{ DiscussionBoard.errors[6631601].message }}

Trending Topics