Is there any way to redirect user according to browser
2015-07-09, 03:22 AM,
#1
For country redirection there is smarturl.

But I want to know is there any way to redirect user according to browser . for example i want to redirect chrome user to cpa and all other browser user to ppi
Reply
2015-07-09, 04:36 AM,
#2
(2015-07-09, 03:22 AM)drone43 Wrote: For country redirection there is smarturl.

But I want to know is there any way to redirect user according to browser . for example i want to redirect chrome user to cpa and all other browser user to ppi

Try this Script (not mine, I found it so don't know how to edit it)...

Code:
<HTML><HEAD><TITLE>Start Page</TITLE>
<SCRIPT LANGUAGE = "JavaScript"><!--
// Script by Iceman, dciceman@usa.net. You can use this script providing
//this header stays in. Copyright 1997 Iceman.
//the parent.location.href statements can be changed to get different redirections for different browsers.

var r
browser = navigator.appName

version="4.0 (compatible; MSIE 4.0b1; Windows 95)"
if (browser == "Microsoft Internet Explorer" && navigator.appVersion==version) {
//If Browser is MSIE 4.0b1 then go to MSIE Page.        
parent.location.href="msiepage.html"
r=2
}

else {
ua="Mozilla/2.0 (compatible; MSIE 3.02; Windows 95)"
if (navigator.userAgent==ua){
//If Browser is MSIE 3.02 go to MSIE Page.
parent.location.href="msiepage.html"
r=2
}

version="4.0 (compatible; MSIE 4.0b2; Windows 95)"
if (browser == "Microsoft Internet Explorer" && navigator.appVersion==version) {
//If Browser is MSIE 4.0b2 then go to MSIE Page.        
parent.location.href="msiepage.html"
r=2
}

version="2.01 (Win95; I)"
if (navigator.appVersion==version && navigator.appCodeName=="Mozilla") {
//If Browser is Netscape 2.01 go to Netscape page.
parent.location.href="nspage.html"
r=1
}

version="2.0 (Win95; I; 16bit)"
if (navigator.appVersion==version && navigator.appCodeName=="Mozilla") {
//If Browser is Netscape 2.0 16 bit go to Netscape page.
parent.location.href="nspage.html"
r=1
}

version="4.01 [en] (Win95; I)"
if (navigator.appVersion==version && navigator.appCodeName=="Mozilla") {
//If Browser is Netscape 4.01 go to Netscape page.
parent.location.href="nspage.html"
r=1
}

version="3.0 (Win95; I)"
if (browser == "Netscape" && navigator.appVersion==version) {
// If browser is Netscape 3.0 for Win95 go to Netscape Page.
parent.location.href="nspage.html"
r=1
    }      
}

if (browser=="Netscape") {
// If browser is Netscape and Supports JavaScript go to Netscape Page
parent.location.href="nspage.html"
r=1
}

if (r !=1 && r !=2){      
// if browser is not Nestcape or MSIE known versions go to MSIE page.
//(caters for any other JavaScript Browsers).
parent.location.href="msiepage.html"
}
    
// -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="000000" TEXT="FFFFFF">
Switching you to next page!<BR><BR>
(If your browser remains on this page for more than 5 seconds it is not JavaScript compatible. Please download a new browser from <A HREF="http://home.netscape.com">Netscape Communications Corp.</A> or <A HREF="http://www.microsoft.com/ie/default.asp">Microsoft Corp.</A>
</BODY>
</HTML>
Reply
2015-07-13, 01:01 AM,
#3
(2015-07-09, 04:36 AM)caesar Wrote:
(2015-07-09, 03:22 AM)drone43 Wrote: For country redirection there is smarturl.

But I want to know is there any way to redirect user according to browser . for example i want to redirect chrome user to cpa and all other browser user to ppi

Try this Script (not mine, I found it so don't know how to edit it)...

Code:
<HTML><HEAD><TITLE>Start Page</TITLE>
<SCRIPT LANGUAGE = "JavaScript"><!--
// Script by Iceman, dciceman@usa.net. You can use this script providing
//this header stays in. Copyright 1997 Iceman.
//the parent.location.href statements can be changed to get different redirections for different browsers.

var r
browser = navigator.appName

version="4.0 (compatible; MSIE 4.0b1; Windows 95)"
if (browser == "Microsoft Internet Explorer" && navigator.appVersion==version) {
//If Browser is MSIE 4.0b1 then go to MSIE Page.        
parent.location.href="msiepage.html"
r=2
}

else {
ua="Mozilla/2.0 (compatible; MSIE 3.02; Windows 95)"
if (navigator.userAgent==ua){
//If Browser is MSIE 3.02 go to MSIE Page.
parent.location.href="msiepage.html"
r=2
}

version="4.0 (compatible; MSIE 4.0b2; Windows 95)"
if (browser == "Microsoft Internet Explorer" && navigator.appVersion==version) {
//If Browser is MSIE 4.0b2 then go to MSIE Page.        
parent.location.href="msiepage.html"
r=2
}

version="2.01 (Win95; I)"
if (navigator.appVersion==version && navigator.appCodeName=="Mozilla") {
//If Browser is Netscape 2.01 go to Netscape page.
parent.location.href="nspage.html"
r=1
}

version="2.0 (Win95; I; 16bit)"
if (navigator.appVersion==version && navigator.appCodeName=="Mozilla") {
//If Browser is Netscape 2.0 16 bit go to Netscape page.
parent.location.href="nspage.html"
r=1
}

version="4.01 [en] (Win95; I)"
if (navigator.appVersion==version && navigator.appCodeName=="Mozilla") {
//If Browser is Netscape 4.01 go to Netscape page.
parent.location.href="nspage.html"
r=1
}

version="3.0 (Win95; I)"
if (browser == "Netscape" && navigator.appVersion==version) {
// If browser is Netscape 3.0 for Win95 go to Netscape Page.
parent.location.href="nspage.html"
r=1
    }      
}

if (browser=="Netscape") {
// If browser is Netscape and Supports JavaScript go to Netscape Page
parent.location.href="nspage.html"
r=1
}

if (r !=1 && r !=2){      
// if browser is not Nestcape or MSIE known versions go to MSIE page.
//(caters for any other JavaScript Browsers).
parent.location.href="msiepage.html"
}
    
// -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="000000" TEXT="FFFFFF">
Switching you to next page!<BR><BR>
(If your browser remains on this page for more than 5 seconds it is not JavaScript compatible. Please download a new browser from <A HREF="">Netscape Communications Corp.</A> or <A HREF="/ie/default.asp">Microsoft Corp.</A>
</BODY>
</HTML>

Pretty easy code Thanks for the share

[Image: di1WHG0.png?1]
Reply
2015-07-13, 01:02 AM,
#4
Through .htaccess is the easiest way.

Cheers
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Disable Last FireFox Browser Version Watt 15 486 2017-12-03, 01:29 AM
Last Post: Watt
  Redirect user based on certain ISP Mix2003_2012 4 140 2017-11-28, 11:41 PM
Last Post: styx
  (help) Redirect Blogspot engkusplus 3 176 2017-11-04, 08:01 AM
Last Post: engkusplus
  Landing Page [redirect] buzzshares 9 345 2017-10-02, 05:21 AM
Last Post: buzzshares
  [Question] Could a GEOIP Redirect be a reason for dangerous browser warnings? CheDz 1 121 2017-09-20, 03:42 PM
Last Post: zamnajali





About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top