Solved

Redirect mobile devices to a different URL?

Posted on 2013-05-28
3
308 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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
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…

733 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