Domain Discussion Board

Go Back   Domain Discussion Board > General > Tutorials

 
Reply
 
LinkBack Thread Tools Display Modes
simple redirection script
Old
  (#1 (permalink))
blue-sky
Senior Member
blue-sky is an unknown quantity at this point
 
Status: Offline
Posts: 238
Points: 52.5
Bank: 6,643.0
Total Points: 6,695.4
Donate
Join Date: Nov 2006
Rep Power: 0
simple redirection script - 11-25-2006, 11:45 PM

Simple Redirection

for designer who use many htmls for his/her site to spesific browser, this is just a sample you can customise by your self.


<?
//free to modify, customise for your own good,
//idban secandri idban@satunet.com
//greet to ppls @ anak2.malasmandi.com

$IE=eregi("MSIE",$HTTP_USER_AGENT);
if (
$IE==true) {
header("Location: http://$HTTP_HOST/4ie.html");
exit;
}
$NN6=eregi("Gecko",$HTTP_USER_AGENT);
if (
$NN6==true) {
header("Location: http://$HTTP_HOST/4nn6.html");
exit;
}
$NN=eregi("mozilla",$HTTP_USER_AGENT);
if (
$NN==true) {
header("Location: http://$HTTP_HOST/4nn.html");
exit;
}
else {
header("Location: http://$HTTP_HOST/4other.html");
exit;
}
?>
   
Reply With Quote
Re: simple redirection script
Old
  (#2 (permalink))
andrew
Senior Member
andrew is an unknown quantity at this point
 
andrew's Avatar
 
Status: Offline
Posts: 212
Points: 67.2
Bank: 0.4
Total Points: 67.6
Donate
Join Date: Nov 2006
Rep Power: 0
Re: simple redirection script - 11-26-2006, 09:29 AM

I didn't understand all of it, but I understand quite a bit of this.
you didnt really tell us what each part does, you just told us the script.


http://Destin-Designs.co.nr - Custom Design 4 U
10$ - 22$
   
Reply With Quote
Sponsored Links
Re: simple redirection script
Old
  (#3 (permalink))
Sava
Sava is an unknown quantity at this point
 
Sava's Avatar
 
Status: Offline
Posts: 1,522
Points: 18.0
Bank: 5,220.2
Total Points: 5,238.2
Donate
Join Date: Nov 2006
Location: http://savasplace.com
Rep Power: 0
Re: simple redirection script - 11-26-2006, 09:39 AM


<?
//free to modify, customise for your own good,
//idban secandri idban@satunet.com
//greet to ppls @ anak2.malasmandi.com

//This is the part for Internet Explorer

$IE=eregi("MSIE",$HTTP_USER_AGENT);
if (
$IE==true) {
header("Location: http://$HTTP_HOST/4ie.html"); // and 4ie.html is the webpage designed to be viewed with i explorer.
exit;
}
$NN6=eregi("Gecko",$HTTP_USER_AGENT); // If browser is Gecko
if (
$NN6==true) {
header("Location: http://$HTTP_HOST/4nn6.html"); // it will go to 4nn6.html
exit;
}
$NN=eregi("mozilla",$HTTP_USER_AGENT); // If browser is Mozzila
if (
$NN==true) {
header("Location: http://$HTTP_HOST/4nn.html"); // it will go to 4nn.html
exit;
}
// If any other browser
else {
header("Location: http://$HTTP_HOST/4other.html"); // the redirect will go to 4other.html
exit;
}
?>

Hope that can help in understanding andrew
   

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.0
Points Per Thread: 15.0
Points Per Reply: 5.0


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple PHP Upload Script (Only 1 PHP file) mycek Scripts 2 11-22-2006 08:10 AM
need decent web scripter for simple script drango91 Employment Section 5 09-23-2006 02:54 PM
Simple Script Question Masked Member Help 5 07-23-2006 06:56 AM


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 ©2007, Crawlability, Inc.