I'm providing my ASP.NET MVC website with a mobile version. Let's say that the web site is www.mywebsite.com and the mobile version will be www.mywebsite.it/Mobile.
As first capability I would be able to identify if a mobile device is invoking www.mywebsite.com and, if it is the case, I would simply redirect the visitor to www.mysite.com/Mobile.
To do this, I integrated the 51degrees.mobi API into my website, as described in the Method 2.2 of http://51degrees.codeplex.com/wikipage?title=MVC, and I used a real iPhone to test it.
The first access to www.mywebsite.com is properly redirected to www.mywebsite.com/Mobile, and the device, the iOS and the Browser are identified. Fine, this is what I am looking for.
Unfortunately, when I had tried again to type www.mywebsite.com once more the iPhone loaded the main home page www.mywebsite.com/home without redirecting to the mobile area.
I'm quite sure that the first access worked well because it is managed by the web.config file directly.
So, what am I missing? Is this a cache or session-related issue? How can I fix it?
Regards, Marco