Welcome to WebmasterWorld Guest from 54.196.231.129

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

How to redirect MAC users to a specific page?

What would I put in the .htaccess file to redirect

     
9:33 pm on Mar 6, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:June 29, 2003
posts:363
votes: 0


Quick question:

How would I redirect all MAC user to an alternative home page using .htaccess (mod rewrite)

9:34 pm on Mar 6, 2004 (gmt 0)

Full Member

10+ Year Member

joined:June 28, 2003
posts:292
votes: 0


Just a nitpick, but it's Mac. MAC is actually a hardware address for network devices...

You could probably do it with the user agent, though it is probably easier to do via something like PHP.

9:37 pm on Mar 6, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:June 29, 2003
posts:363
votes: 0


Oh thanks for the tidbit :)

Would there be a way to just use a line in a .htaccess file for the home page? I think I read somewhere that you would redirect users to alternative pages given their OS, Browser etc.

I would like all Mac users to go to the Mac home page at our site and need to know how this can be done using .htaccess.

We are already using mod_rewrite to send users to cgi type pages when they go to a static directory.

9:45 pm on Mar 6, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:June 29, 2003
posts:363
votes: 0


Here is a good example of what we would like to do using .htaccess or another easy way...

BuyMusic is now redirecting Mac users to a page that indicates users must be running Windows and Internet Explorer to access the site.

12:28 am on Mar 7, 2004 (gmt 0)

Full Member

10+ Year Member

joined:June 28, 2003
posts:292
votes: 0


And they probably are doing it via ASP / JSP (whatever they are using). It's not hard to do in a scripting language.

But, if you just code a standards compliant site, you don't need to redirect based on OS.

dcrombie

12:17 pm on Mar 8, 2004 (gmt 0)

Inactive Member
Account Expired

 
 


BuyMusic is using JavaScript browser detection (slightly broken and about 10 times longer than needed) to stop Mac users, Netscape and Opera users and anyone using IE<5.0 from accessing the site.

It's pretty pathetic IMHO for a site to only work in one browser ;)

1:35 am on Mar 15, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


RobbieD,

You can use .htaccess to redirect based on the user-agent (browser) name, but not on the OS. The browser generally supplies its user-agent name with each request that it makes, but it does not usually send any OS information. However, as stated above, the OS information *is* accessible using a client-side script, such as JavaScript.

I do agree that a standards-compliant site has no need of such work-arounds, but I hope that helps.

Jim