Jump to content

Redirect from specific page to mobile URL


solwebsolutions

Recommended Posts

My client has created a QR Code that goes to a specific page on a non-mobile site. The client does have a mobile site, m.customersdomain.com
 
Question is, the QR Code has already been submitted to print for advertising and is going to a regular URL.
 
Is there a way to look for mobile devices that hit this one non-mobile page and redirect them to a specific mobile URL / page?

 

Would this be something in .htaccess file?

 

Basically, I'm looking @ 2 questions:

1.  Are you hitting a specific URL (already embedded in the QR Code)?

2.  Are you a mobile device?

 

If both are yes >> go to this mobile page

 

Link to comment
Share on other sites

All,

Have this so far for JS:

if ((screen.width <= 700) &&
currentpage("regularURL")) {
window.location = "mobileurl";
}

I just need to figure out how to look @ the current URL ...I know currentpage() isn't really a function, but wanted to use it for getting my point across.

...and if it is in fact regular URL, then send them via window.location to mobile URL

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.