aguroyz — 2014-05-23T03:02:22-04:00 — #1
How can I achieve this in HTACCESS.. What I want is that if a user is using a Smartphone device and access the link http://luxury.localhost/others/mypage.html he will be redirected to http://luxury.localhost/sp/entry but if he is just using a PC he will be redirected to http://luxury.localhost/entry page..
#the logic is something like this
# If using smartphone
RedirectMatch /others/mypage.html /sp/entry/
#else if using PC
RedirectMatch /others/mypage.html /entry/
PLease help me.
paulob — 2014-05-23T10:44:06-04:00 — #2
Maybe these articles can help.
Although I think the best choice is to simply have a link from the main site to your mobile site and give users the choice rather than forcing it on them (or at least make sure there is a link back to the main site on the mobile site and remember the users preference).
phoenixws — 2014-05-30T02:32:20-04:00 — #3
You could try redirecting based on user agent strings or use @media in css to detect screen size and adjust accordinly.