May 23, 2019
Identify And Redirect To iPhone Using .htaccess

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
1 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] |
Mraj
Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts. If you have any questions let me drop an email with the article name to the following email id: [email protected]