PDA

View Full Version : HTTP/WAP Redirect



bluephoenix
02-06-2003, 07:23 PM
The company wants to have portions of it's website accessible through Cell Phones and other wireless-enabled portable devices. All good and well, but they don't want to confuse people with two different URLS (www.domain.com and wap.domain.com). So It's up to me to come up with some redirect for the wireless people.

I've seen some scripts using PHP that detects the browser and redirects accordingly... but with over 160 different brands of web enabled cellphones on the market alone I don't want to have to maintain a database with browser IDs.

From what I've pieced together, traditional web browsers connect using HTTP while wireless browsers connect using WAP. Is there a way that I could detect the protocol being used instead of the browser ID and redirect accordingly? I don't see any $USER_PROTOCOL variables. :)

Feyd
02-08-2003, 03:20 AM
Nope...the easy way to detect wireless devices is by HTTP_ACCEPT...you detect if the agent accepts certain encoding (or if it is WindowsCE for safety) and redirect:

See this discussion we had on it a bit ago:
http://codingforums.com/showthread.php?s=&threadid=11645

whammy
02-09-2003, 12:16 AM
Very helpful information. (Hits CTRL+D) :)

bluephoenix
02-10-2003, 08:53 PM
Thank you. :)