In this article, we going to see how to identify and redirect to iPhone using .htaccess. In the huge market, you target only iPhone uses to identify and redirect a particular link or page. Here is how to redirect to iPhone traffic with .htaccess.
Redirect The User To iPhone Specific Subdomain
2 3 | RewriteEngine on RewriteCond %{HTTP_USER_AGENT} iPhone RewriteRule .* http://iphone.softaox.info/ [R] |
Above code will identify and redirect iPhone users to an iPhone specific subdomain ( example: http://iphone.softaox.info/ ).
Redirect The User To iPhone Secific Directory
If would you like to redirect to a subdirectory of your website, ( example: softaox.info/iPhone-site/ ), you need to use the following code:
1 2 3 4 | RewriteEngine on RewriteCond %{HTTP_USER_AGENT} iPhone RewriteCond %{REQUEST_URI} !^/iPhone-site/ RewriteRule .* /iPhone-site/ [R] |
No comments:
Post a Comment