Redirect a user to a mobile version of a website

Ask a question

Redirect your users to a mobile version of your website using htaccess

If you have a mobile version of your website, then it may be that you want to automatically redirect your visitors to the latter (each time they connect via theire mobile)
  • To do this there are several solutions, the simplest is to use the .htaccess file and write the following lines of code:

RewriteCond %{HTTP_USER_AGENT} "ipod|iphone|ipad|android|palm" [NC]    
RewriteRule (.*) [R=301,L]   
  • Here the mobile user are redirected to:
  • To change the domain name, simply edit the second line!

Choosing a web agency
How to install MyIGSR on a Web server?