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


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:


RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} iPhone
RewriteCond %{REQUEST_URI} !^/iPhone-site/ 
RewriteRule .* /iPhone-site/ [R]

Was this article helpful?

Yes No
×

How can we improve it?

×

We appreciate your helpul feedback!

Your answer will be used to improve our content. The more feedback you give us, the better our pages can be.

Follow us on social media:

Facebook Pinterest
Share via:

Leave a Reply

Your email address will not be published. Required fields are marked *