12 Jan 2011 at 15:27 #1 mr.sly mr.sly Soldato Joined 25 Jul 2006 Posts 3,877 Is it possible to detect Windows XP using a .htaccess file and then serve those users a different CSS file?
Is it possible to detect Windows XP using a .htaccess file and then serve those users a different CSS file?
12 Jan 2011 at 15:52 #2 rickh rickh Associate Joined 26 Dec 2008 Posts 623 Not sure why you want to do it with .htaccess but here's how to do it with php: Code: if(preg_match('/Windows NT 5.(1|2)/',$_SERVER["HTTP_USER_AGENT"])){ echo 'hello windows xp user, have a different css file: <style>.....'; } Here are the Windows NT numbers for the various Windows OS's: http://en.wikipedia.org/wiki/Windows_NT
Not sure why you want to do it with .htaccess but here's how to do it with php: Code: if(preg_match('/Windows NT 5.(1|2)/',$_SERVER["HTTP_USER_AGENT"])){ echo 'hello windows xp user, have a different css file: <style>.....'; } Here are the Windows NT numbers for the various Windows OS's: http://en.wikipedia.org/wiki/Windows_NT
12 Jan 2011 at 15:55 #3 TwoSaints TwoSaints Soldato Joined 19 Dec 2007 Posts 2,663 Location Newton Aycliffe Here is a bit of info about detecting iPhone, so perhaps you can adapt if to detect windows using the list posted above? http://www.htaccesstools.com/articles/detect-and-redirect-iphone/ Last edited: 12 Jan 2011
Here is a bit of info about detecting iPhone, so perhaps you can adapt if to detect windows using the list posted above? http://www.htaccesstools.com/articles/detect-and-redirect-iphone/
12 Jan 2011 at 16:51 #4 gord gord Soldato Joined 18 Oct 2003 Posts 19,415 Location Midlands In my experience, cross operating system issues can be solved gracefully. Can we ask to what ends you need this?
In my experience, cross operating system issues can be solved gracefully. Can we ask to what ends you need this?