I am working on a .NET based mobile site (m.website.com). I am using IIRF on the main site (non-mobile) for URL rewriting.
Now, it is required to redirect any mobile user to the mobile site if they land up on the main site (www.website.com). I am able to achieve this by checking the user agent in IIRF and redirecting.
The issue I'm facing is that:
The mobile site will have a link back to the main site. If a mobile user clicks on this link then he should not be redirected back to the mobile device.
I tried to follow the htaccess solution mentioned in this post - Mobile Redirect using htaccess but its not working properly with IIRF. RewriteCond
for {QueryString}
is not working properly. Also, I am not sure if I can set a cookie from IIRF itself, the way its mentioned in the link.
I have been struggling with this issue for quite a few hours, it would be great if someone could help.
Another approach I tried was checking the HTTP_REFERER
to avoid redirection if the referring site is the mobile site but that did not work as well.