Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Browser Specific Redirect
Old 08-26-2007, 01:33 PM Browser Specific Redirect
alecrust's Avatar
Average Talker

Posts: 28
Location: United Kingdom
Trades: 0
Hi,

I was wondering if someone could write me a simple PHP script. I am looking for a way to redirect a browser to a different site if they are using IE 6. If they are using any other browser I want it to continue loading.

What would be the best way to achieve this?

Thanks in advance.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
alecrust is offline
Reply With Quote
View Public Profile Visit alecrust's homepage!
 
 
Register now for full access!
Old 08-26-2007, 11:24 PM Re: Browser Specific Redirect
coolkbk585's Avatar
Be good this Christmas!

Latest Blog Post:
KBlog has been deativated
Posts: 642
Name: Kyle
Location: Ada, MI
Trades: 0
That would be more of a Javascript thing.

Code:
<!--[if IE 6]> 
<script type="javascript"> 
document.location.href= "http://www.yoursite.com";
</script>
<!--[endif]>
Just put that at the top of your <head> section, and it should redirect people that are using IE6
__________________
<?php if($Adsense_Revenue > 0): define('HAPPINES','100%'); else: define('HAPPINESS', '0%') endif; ?>
coolkbk585 is offline
Reply With Quote
View Public Profile Visit coolkbk585's homepage!
 
Old 08-27-2007, 02:19 AM Re: Browser Specific Redirect
alecrust's Avatar
Average Talker

Posts: 28
Location: United Kingdom
Trades: 0
Your comment wasn't closed properly, should have been
Code:
<![endif]-->
But other than that it's perfect. Thanks alot!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
alecrust is offline
Reply With Quote
View Public Profile Visit alecrust's homepage!
 
Old 08-27-2007, 06:53 AM Re: Browser Specific Redirect
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
Code:
<!--[if IE 6]> 
<script type="javascript"> 
document.location.href= "http://www.yoursite.com";
</script>
<![endif]-->
is the easiest way to do it.
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 08-27-2007, 02:28 PM Re: Browser Specific Redirect
coolkbk585's Avatar
Be good this Christmas!

Latest Blog Post:
KBlog has been deativated
Posts: 642
Name: Kyle
Location: Ada, MI
Trades: 0
Quote:
Originally Posted by alecrust View Post
Your comment wasn't closed properly, should have been
Code:
<![endif]-->
But other than that it's perfect. Thanks alot!
whoops, good thing you caught that
__________________
<?php if($Adsense_Revenue > 0): define('HAPPINES','100%'); else: define('HAPPINESS', '0%') endif; ?>
coolkbk585 is offline
Reply With Quote
View Public Profile Visit coolkbk585's homepage!
 
Old 08-28-2007, 07:26 PM Re: Browser Specific Redirect
Skilled Talker

Posts: 62
Name: Tom Wright
Location: Brighton, UK
Trades: 0
See my post here: http://www.webmaster-talk.com/php-fo...tml#post448351 for a brief explanation on how to do this with php.
I wrote it for search engine spiders, but you could easily adapt it.
__________________
My site:
Please login or register to view this content. Registration is FREE
tomythius is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Browser Specific Redirect
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23269 seconds with 12 queries