Redirecting to a Mobile Site

Aug 24, 2009 at 5:46 PM
Edited Aug 24, 2009 at 7:37 PM


I found it The answer to this post...




I have an HTML site and I want a mobile device, when hitting my site to go to the mobile site(Ex. Instead of, on a mobile device it would go to

I have tried to just make an ASP .NET project and put in the Page_Load method:


if (Request.Browser.IsMobileDevice)


I have no idea if it is this easy or not... I also don't know how to cause a redirect from the url they gave to the url of the mobile site.

Thanks for any help.


Dec 14, 2010 at 6:59 PM


Please take a look at It is an ASP.NET open source module  which detects mobile devices and provides auto redirection to mobile optimized pages when request is coming from mobile device. It makes use of WURFL mobile device database. For redirection there is no need to modify existing ASP.NET web application pages.

Below is sample web.config settings to show how easy it is to implement mobile detection and rediection without modifying any of your existing web pages.

<redirect firstRequestOnly="true"
<!--Send iphone to their own home page.-->
<location url="~/Apple/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="Apple"/>
<!--Send blackberry to their own home page.-->
<location url="~/RIM/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="RIM"/>
<!--Send nokia to their own home page.-->
<location url="~/Nokia/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="Nokia"/>


Jan 9, 2011 at 7:30 AM