WordPress.org

Support

Support » How-To and Troubleshooting » how do you redirect to a mobile version of your site?

how do you redirect to a mobile version of your site?

  • How do you redirect to a mobile version of your site?

    What is the best way to do it?

    Do you do it by adding code to the .htaccess file?

    Javascript? What is the best way.

    I have a mobile version of my site… http://www.site.mobi, that I would like mobile phone browsers to be redirected to…

Viewing 3 replies - 1 through 3 (of 3 total)
  • <script type=”text/javascript”>
    <!–
    if (screen.width <= 699) {
    document.location = “mobile.html”;
    }
    //–>
    </script>

    this should be enough.

    wow! cool. I hope it works for me. thank you,

    I will let you know. 🙂

    Well, I tried to put that in the <head> of the document, and it keeps giving me an
    Internal Server Error.

    I pasted it in exactly as you posted here.

    ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how do you redirect to a mobile version of your site?’ is closed to new replies.
Skip to toolbar