corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Mobile redirect


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Mobile redirect
Gary
Premium Member

Avatar

Registered: 22nd Nov 06
Location: West Yorkshire
User status: Offline
7th Aug 12 at 13:52   View Garage View User's Profile U2U Member Reply With Quote

Need to redirect mobile users to the mobile version of our website

How's it done?
Whittie
Member

Registered: 11th Aug 06
Location: North Wales Drives: BMW, Corsa & Fiat
User status: Offline
7th Aug 12 at 13:58   View User's Profile U2U Member Reply With Quote

I told Si this last week, did he not sort it out?

You're re-directing iphones only aren't you, as the site was flash?
Gary
Premium Member

Avatar

Registered: 22nd Nov 06
Location: West Yorkshire
User status: Offline
7th Aug 12 at 14:06   View Garage View User's Profile U2U Member Reply With Quote

And android. It'll be hard to navigate on any device.

all he said it was something to do with the htacces but that was it
Whittie
Member

Registered: 11th Aug 06
Location: North Wales Drives: BMW, Corsa & Fiat
User status: Offline
7th Aug 12 at 14:11   View User's Profile U2U Member Reply With Quote

RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^siteurltoredirect$ http://theendpointurl.com [R,L]

Just bang that in it, covers 99% of UK phones, so should be alright if you're usin... m.theendpointurl.com its different though, theres a tut somewhere. Let me know if you need it
Gary
Premium Member

Avatar

Registered: 22nd Nov 06
Location: West Yorkshire
User status: Offline
7th Aug 12 at 14:21   View Garage View User's Profile U2U Member Reply With Quote

redireted url will just be the normal url/mobile
ed
Member

Registered: 10th Sep 03
User status: Offline
7th Aug 12 at 14:21   View User's Profile U2U Member Reply With Quote

http://detectmobilebrowsers.mobi/download/
Gary
Premium Member

Avatar

Registered: 22nd Nov 06
Location: West Yorkshire
User status: Offline
7th Aug 12 at 14:26   View Garage View User's Profile U2U Member Reply With Quote

Pay via twitter or bookface?

not got either
Nismo
Member

Registered: 12th Sep 02
User status: Offline
7th Aug 12 at 14:27   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by ed
http://detectmobilebrowsers.mobi/download/


I use this works perfectly, you can direct different OS users to different versions to optimise iPhone users etc...
Dom
Member

Registered: 13th Sep 03
User status: Offline
7th Aug 12 at 14:53   View User's Profile U2U Member Reply With Quote

Use htaccess and have a look at http://stackoverflow.com/questions/3680463/mobile-redirect-using-htaccess.

$40p/y seems a bit steep for something that essentially can be done for free.....

noshua
Member

Registered: 19th Nov 08
User status: Offline
7th Aug 12 at 16:06   View User's Profile U2U Member Reply With Quote

http://detectmobilebrowsers.com/
ed
Member

Registered: 10th Sep 03
User status: Offline
7th Aug 12 at 16:29   View User's Profile U2U Member Reply With Quote

A real man would build their website using semantic HTML5, then use CSS media queries to alter the layout for mobile and tablet users

Edit: actually looking at the link I posted - I think I meant to share the one noshua put up because I'm sure I never paid for it before.

[Edited on 07-08-2012 by ed]
Nismo
Member

Registered: 12th Sep 02
User status: Offline
8th Aug 12 at 09:51   View User's Profile U2U Member Reply With Quote

I dont think you pay for the one you put up, you can give a donation but theres a free download link too.
Dom
Member

Registered: 13th Sep 03
User status: Offline
8th Aug 12 at 10:14   View User's Profile U2U Member Reply With Quote

Assuming everyone just uses the Rewrite rules rather than doing it server-side (can't think of a valid reason why you'd do it server-side if it's a site wide redirect)?

Ed - CSS media queries isn't a 100% solution for mobile sites, especially when it comes to browser compatibility (although there are JS/JQ workarounds but then you're dependant on JS being enabled).

Edit - You'd also probably also want to change the rewriterule to include paths/passing variables eg -
code:
RewriteRule ^/(.+) http://m.mydomain.com/$1 [R,L]


[Edited on 08-08-2012 by Dom]
ed
Member

Registered: 10th Sep 03
User status: Offline
8th Aug 12 at 10:24   View User's Profile U2U Member Reply With Quote

Server side tests can be useful if you want the user to be able to override the re-direct. Can be annoying if the website kindly redirects you to a mobile site which has limited functionality.

Saying that, I'm sure you could do something fancy with conditional redirects/rewrites if needed to.
Dom
Member

Registered: 13th Sep 03
User status: Offline
8th Aug 12 at 10:34   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by ed
Saying that, I'm sure you could do something fancy with conditional redirects/rewrites if needed to.


Not sure about Apache but under Nginx you have cookie access in the configs, so you could give the option of overriding the default mobile site redirection if you wanted.


[Edited on 08-08-2012 by Dom]

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Domain redirect Cosmo Geek Day 4 257
7th Jun 08 at 13:24
by Cosmo
 
Dan's Star Silver C20XE SXi *Billing update and pics* DansCorsaSXi Projects and Builds 6057 244881
24th Apr 14 at 09:10
by LukesCorsaSXi
 
Alloys Sam General Chat 28 1607
23rd Feb 12 at 15:43
by scoob
 
iPhone 3GS 16GB White, Very Cheap! Norcy91 External Links 0 319
11th Apr 12 at 22:21
by Norcy91
 
inlet power box chrimbo88 Wanted 8 514
27th Apr 12 at 12:05
by corsajay88
 

Corsa Sport » Message Board » Off Day » Geek Day » Mobile redirect 29 database queries in 0.0082901 seconds