Skip to content

Instantly share code, notes, and snippets.

@RockyMyx
Created August 18, 2013 15:35
Show Gist options
  • Save RockyMyx/6262255 to your computer and use it in GitHub Desktop.
Save RockyMyx/6262255 to your computer and use it in GitHub Desktop.
.NET: reponsive-web.config
<redirect firstRequestOnly="true"
mobileHomePageUrl="~/Mobile/Default.aspx"
timeout="20"
devicesFile="~/App_Data/Devices.dat"
mobilePagesRegex="/(Mobile|Smartphone)/" >
<locations>
<!--Send smartphones to an equivalent version of the original page, preserving the page name and query string.-->
<location name="smartphone" url="~/Smartphone/{0}" matchExpression="(?<=^\w+://.+/).+">
<add property="IsSmartphone" matchExpression="true"/>
</location>
</locations>
</redirect>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment