Results 1 to 4 of 4

Thread: Block Browsers/Redirect Browsers [Help]

  1. #1
    Join Date
    Feb 2012
    Posts
    4

    Question Block Browsers/Redirect Browsers [Help]

    I need a code that will allow only Google Chrome to access my website while all other browsers to be redirected to a another url. I have searched hours for a code but have failed to find one, I would greatly appreciate it if someone could post it below. Please do not ask why I want to do this, I have my reasons and I would like them to remain private.
    If their is any more information that is needed please tell me.

  2. #2
    Join Date
    Dec 2007
    Location
    Alexandria, MN USA
    Posts
    6,040

    Default

    You can use a javascript script to do this. If you go to hotscripts you will find a whole section of scripts for redirecting visitors depending on their browser. If you don't find one to do exactly what you want you can modify (or get someone to help you modify) one for your use.
    Good Success!

    Douglas County Master Gardeners
    Making money online is not difficult. What is difficult is the discipline one needs to stay focused on the process. —Kathleen Gage

  3. #3
    Join Date
    Feb 2012
    Posts
    4

    Lightbulb

    Thankyou but I am unable to find one that works, could someone please post the code below or link me to one that works properly. I am inexperienced with Java.

  4. #4
    Join Date
    Feb 2012
    Posts
    4

    Default

    I found a code but could someone please modify it to allow Google Chrome and redirect the other browsers to another page.
    Code:

    <html>
    <head>
    <!--
    This file retrieved from the JS-Examples archives
    I CANT POST LINKS
    1000s of free ready to use scripts, tutorials, forums.
    Author: JS-Examples - I CANT POST LINKS
    -->

    </head>
    <body>
    <script type=text/javascript>
    function doIt() {
    if (navigator.appName.indexOf("Netscape") != -1)
    window.location = "I CANT POST LINKS";
    if (navigator.appName.indexOf("Microsoft") != -1)
    window.location = "I CANT POST LINKS";
    else{
    document.location = "I CANT POST LINKS";
    }
    }
    </script>
    <a href="javascript:doIt()">Run Test and Re-Direction</a>
    <BR><center><a href='I CANT POST LINKS'>JS-Examples.com</a></center>
    </body>
    </html>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •