.htacces
- Started
- Last post
- 8 Responses
- dbloc
I am trying to exclude ipad from the mix but forward to /m for all mobile devices
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/m/.*$
RewriteCond %{HTTP_ACCEPT} "text/vnd.wap.wml|application/vn... [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "acs|alav|alca|amoi|audi|aste|av... [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "dang|doco|eric|hipt|inno|ipaq|j... [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "maui|maxo|midp|mits|mmef|mobi|m... [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "palm|pana|pant|pdxg|phil|play|p... [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "sch-|sec-|send|seri|sgh-|shar|s... [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "teli|tim-|tosh|tsm-|upg1|upsi|v... [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "wapp|wapr|webc|winw|winw|xda|xd... [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "up.browser|up.link|windowssce|i... [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "symbian|midp|wap|phone|pocket|m... [NC]
RewriteCond %{HTTP_USER_AGENT} !macintosh [NC] #*SEE NOTE BELOW
RewriteRule ^(.*)$ /m/ [L,R=302]
- dbloc0
is there something that I need to remove?
- dbloc0
Thanks...here it is..
- acescence0
I don't see anything referring to ipad in there. fyi, you can test for ipad by using desktop safari and setting your user agent to ipad in the develop menu.
- acescence0
RewriteCond %{HTTP_USER_AGENT} !^.*iPad.*$
- utopian0
I usr this .htacces, works fine for my client's devices (iPhone & iPad)
RewriteEngine On
RewriteBase /RewriteCond %{HTTP_USER_AGENT} ^.*ipad.*$ [NC]
RewriteRule ^$ http://www.peterschafrick.com/ip… [R,L]
RewriteCond %{HTTP_USER_AGENT} android|avantgo|blackberry|blaze... |maemo|midp|mmp|mobile|o2|opera\ mini|palm(\ os)?|plucker|pocket|pre\/|psp|sm... ce;\ (iemobile|ppc)|xiino [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(1207|6310|6590|3gso|4thp|50[1... wa|abac|ac(er|oo|s\-)|ai(ko|rn... |s\ )|avan|be(ck|ll|nq)|bi(lb|rd)|bl... u|g560|gene|gf\-5|g\-mo|go(\.w|o... i|ip)|hs\-c|ht(c(\-|\ |_|a|g|p|s|t)|tp)|hu(aw|tc)|i... |\-|\/)|ibro|idea|ig01|ikom|im1k... |\/)|klon|kpt\ |kwc\-|kyo(c|k)|le(no|xi)|lg(\ g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w... |o|v)|zz)|mt(50|p1|v\ )|mwbp|mywa|n10[0-2]|n20[2-3]|n3... )|sy(01|mb)|t2(18|50)|t6(00|10|1... )|webc|whit|wi(g\ |nc|nw)|wmlb|wonu|x700|xda(\-|2... [NC]
RewriteRule ^$ http://www.peterschafrick.com/mo… [R,L]
- dbloc0
THANKS acescence! That Worked....