Solved

Redirect mobile devices to a different URL?

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now