Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Redirect mobile devices to a different URL?

Posted on 2013-05-28
3
Medium Priority
?
311 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 1500 total points
ID: 39200959
check this too : http://jsfiddle.net/3jeMe/2/
0

Featured Post

Technology Partners: 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…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

715 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