I need help redirecting mobile users to my mobile website using htaccess.
Here is my code …
#RewriteCond %{QUERY_STRING} !^desktop
#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|iphone|ipod|#opera mobile|palmos|webos" [NC]
#RewriteRule ^(fresh|hot|featured|trending)$ https://www.example.com/mobile/$1 [L,R=302]
I also need help with executing two rewrite rules for the same conditions… This is what I tried …
#RewriteCond %{QUERY_STRING} !^desktop
#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|iphone|ipod|#opera mobile|palmos|webos" [NC]
#RewriteRule ^(fresh|hot|featured|trending)$ https://www.example.com/mobile/$1 [N,R=302]
#RewriteRule ^member/(fresh|hot|featured|trending)$ https://www.example.com/mobile/member/$1 [L,R=302]
I commented out the code, don’t mind it.