Solved

Redirect mobile devices to a different URL?

Posted on 2013-05-28
3
309 Views
Last Modified: 2013-06-12
Hi Experts,

I want to redirect my site if user using mobile redirect mobile link and if using pc or tablet redirect normal view..

It's possible to do in my html or using js? Plz guide me experts.

Thanks
0
Comment
Question by:codeoxygen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 39200572
0
 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 39200809
Use javascript in the head section of your mainpage :
<script type="text/javascript">
  <!--
  if (screen.width <= 800) {
//Use your screen size for mobile here I am posting for <=800
    window.location = "http://m.yoursite.com";
  }
  //-->
</script>

Open in new window

0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 39200959
check this too : http://jsfiddle.net/3jeMe/2/
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question