Webmaster Forums 101 - Free Help and Discussions
 
 
 

MEMBER REWARDS - Earn free advertising by participating in these forums! Click here for details.

Welcome to Webmaster Forums 101!

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th March 2005, 02:35 AM   #1

Username: techitout
Rank: WF101 Newbie
Join Date: Mar 2005
Posts: 17
Points: 0.00
Default Redirect script for IE5/Mac

This simple script is to redirect IE5/Mac users to a separate page. My site [www.techitoutuk.com] is written in XHTML and IE5 is incompatible.
It does not work, the sniffer code must be wrong.

<script type="text/javascript">

function redirectPage() {
if (document.all&&document.getElementById&&navigator. savePreferences)
window.location.href="http://www.techitoutuk.com/macfront.html"
else
window.open
}
</script>
</head>
<body redirectPage()">

Can any Mac users try it out.
It incorrectly finds Opera7 and redirects (not IE6 or Mozilla)

Tony Bell
techitout is offline   Reply With Quote
Old 9th March 2005, 03:23 AM   #2
Darksat's Avatar

Username: Darksat
Rank: Tech Master
Join Date: Feb 2005
Posts: 122
Points: 17.77
Default

I think you need to start from scratch.

I would recommend a PHP user agent sniffing script.
__________________
-==New Computer Security Forum==-
--{Time to get Tech}--
Darksat is offline   Reply With Quote
Old 9th March 2005, 09:25 AM   #3
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

I agree with Darksat. If you still want to sue JavaScript have a look through these scripts:
http://www.hotscripts.com/JavaScript...Browser_Based/

Or for PHP:
http://www.hotscripts.com/PHP/Script...s/Redirection/

Hopefully you can find what you're looking for
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 9th March 2005, 09:54 AM   #4

Username: techitout
Rank: WF101 Newbie
Join Date: Mar 2005
Posts: 17
Points: 0.00
Default No luck searching for a script.

Thanks for the advice. I have been looking for PHP and JS scripts since yesterday with little luck. Nothing applicable at suggested sites.
I wrote the following but it does not work correctly. It is incorrectly redirecting in Opera7 (not in IE6 or Mozilla) So it is not finding IE5/mac
Try it out at [www.techitoutuk.com]

<script type="text/javascript">

function redirectPage() {
if (document.all&&document.getElementById&&navigator. savePreferences)
window.location.href="http://www.techitoutuk.com/macfront.html"
else
window.open
}
</script>
<body onLoad="redirectPage()">

I am out of my depth!

Tony Bell
techitout is offline   Reply With Quote
Old 9th March 2005, 10:19 AM   #5
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

OK, so let me jsut make sure I understand...

You are wanting to redirect them depending on their Operating System no their browser?
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 10th March 2005, 06:16 AM   #6
Darksat's Avatar

Username: Darksat
Rank: Tech Master
Join Date: Feb 2005
Posts: 122
Points: 17.77
Default

Take a look at this
http://codewalkers.com/tutorials/75/2.html
__________________
-==New Computer Security Forum==-
--{Time to get Tech}--
Darksat is offline   Reply With Quote
Old 10th March 2005, 06:27 AM   #7

Username: techitout
Rank: WF101 Newbie
Join Date: Mar 2005
Posts: 17
Points: 0.00
Default Redirecting IE5 + Mac

I only want to redirect users who run IE5 on a Mac. The reason is that this combination is incompatible with XML. My site is designed in XHTML.
IE6, Opera7 and Mozilla work on all other systems.

Tony
techitout is offline   Reply With Quote
Old 10th March 2005, 08:27 AM   #8
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

Here's what I found... Not sure but you may need to emsh two scritps together... if you have any probs let me know:

http://techpatterns.com/downloads/ph..._detection.php
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 10th March 2005, 09:21 AM   #9

Username: techitout
Rank: WF101 Newbie
Join Date: Mar 2005
Posts: 17
Points: 0.00
Default Thanks

Thanks for info, I have been scanning for scripts all evening listening to Chick Corea. I'll have a look tomorrow, Good night.

Tony
techitout is offline   Reply With Quote
Old 12th March 2005, 09:45 AM   #10

Username: techitout
Rank: WF101 Newbie
Join Date: Mar 2005
Posts: 17
Points: 0.00
Default

I have found this code from Rincewind. I have uploaded it to my website [www.techitoutuk.com] Could somebody with IE5 with Mac try it for me

<?php
$User_Agent = $_SERVER['HTTP_USER_AGENT'];
if ((eregi("MSIE", $User_Agent)) &&
(!((eregi("AOL", $User_Agent)) ||
(eregi("WebTV", $User_Agent))))) {
// browser is MSIE.
if (eregi("mac", $User_Agent)) {
// and it's running on a Mac.
// so redirect.
header ('Location: http://www.example.com');
exit();
}
}
?>

Tony
techitout is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help creating a members only script Rainbow Server-Side Scripting & Databases 8 29th March 2005 09:02 PM
Full Page Force Script Abraxas Server-Side Scripting & Databases 1 20th November 2003 03:15 PM
Installation script help viper Server-Side Scripting & Databases 5 18th August 2003 10:44 AM
Script Ideas Mr. Tech Server-Side Scripting & Databases 4 11th June 2003 02:20 PM
nice new script!! dingclancy Suggestions and Feedback 8 31st March 2003 02:08 PM

Login
User Name
Password


Featured Members


Featured Links


Useful Resources
Webmaster Resources
Developers Tools
Developer Tutorials


Partners

All times are GMT +10. The time now is 06:19 AM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.3.2
 
 
WEBMASTER FORUMS 101
ARCHIVE
CONTACT US
TOP
   
© Webmaster Forums 101 2005. All Rights Reserved.
Design by: vBCore