|
|
|
|
![]() ![]() |
Apr 21 2008, 03:34 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 263 Joined: 8-January 08 From: UK - Kent Member No.: 55,950 |
Basically i want a code to redirect people to a different page if they're using anything but firefox, there are codes for it but i cant find 1. If anyone can give me a hand it would be appreciated!!!
|
|
|
|
Apr 21 2008, 03:45 PM
Post
#2
|
|
|
PROGRAMMER(prō'grăm'ər)- n. An organism that converts caffeine into software. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 920 Joined: 25-September 05 From: The dungeon deep below the foundation of trap17 Member No.: 12,251 |
You could do this in javascript, but then nothing would happen to people with javascript disabled. I believe the best solution for this is to use some php.
CODE $redirect="http://www.redirecturlgoeshere.net"; if(preg_match('/Firefox/',$_SERVER['HTTP_USER_AGENT']))!=1) header("Location: ".$redirect); But if the reason you want to do this is because IE or some other browser isn't supported you might want to think about allowing safari as well seeing as they render pages almost exactly alike. |
|
|
|
Apr 21 2008, 04:41 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 263 Joined: 8-January 08 From: UK - Kent Member No.: 55,950 |
QUOTE Yeah bu safari is an apple program teasing! - (quoted cos i dont deserve credits 4 it) do i just replace the firefox bit with safari?? |
|
|
|
Apr 21 2008, 07:12 PM
Post
#4
|
|
|
PROGRAMMER(prō'grăm'ər)- n. An organism that converts caffeine into software. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 920 Joined: 25-September 05 From: The dungeon deep below the foundation of trap17 Member No.: 12,251 |
If you want to include safari do this:
CODE $redirect="http://www.redirecturlgoeshere.net";
if(preg_match(array('/Firefox/','/Safari/'),$_SERVER['HTTP_USER_AGENT']))!=1) header("Location: ".$redirect); |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 16th May 2008 - 07:55 PM |