Redirect depending on User Agent means Apache


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
3 views
Hello,

tell me, please, is it possible in the config of the virtual host to check for a user agent words iphone, ipod, ipad and, if so, to throw it to another domain?
by | 3 views

3 Answers

0 like 0 dislike
Opens the documentation for mod_rewrite and a little change is one example:
\r
\r
RewriteCond %{HTTP_USER_AGENT} iphone|ipod|ipad RewriteRule ^/(.*) http://iphone.mysite.ru/$1 [L] 
by
0 like 0 dislike
. View the documentation for mod_rewite
by
0 like 0 dislike
In .htaccess:
\r
RewriteEngine On RewriteCond %{HTTP_USER_AGENT} Mobile.+Safari RewriteRule ^ http://habrahabr.ru [R,L] 
by

Related questions

0 like 0 dislike
2 answers
asked May 21, 2019 by sorry_i_noob
0 like 0 dislike
2 answers
asked Aug 16, 2019 by LegeArtis
0 like 0 dislike
1 answer
asked May 22, 2019 by Gikelan
0 like 0 dislike
1 answer
asked Apr 20, 2019 by azovl
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
27,373 users