How do I configure the 51Degrees <redirect>
element as described in the documentation to only redirect requests made to the root address at http://mydomain.com/
to a mobile address (e.g. http://mydomain.com/m
), but not requests made to any other addresses, e.g. http://mydomain.com/page123
?
Asked
Active
Viewed 753 times
3

Petrus Theron
- 27,855
- 36
- 153
- 287
2 Answers
1
I currently work for 51degrees.mobi.
The documentation that you have pointed out in your question is old and is going to be moved. I'm sorry for the confusion. The current documentation for .NET can be found on our website.
To do what you need I suggest you set up a location rule and use the "origUrl" property. This is outlined here under section 2.1.2
Hope this helps.

Chris B
- 925
- 4
- 14
0
This one worked for me
<redirect firstRequestOnly="false"
mobileHomePageUrl="~/m"
mobilePagesRegex="^~/\S+$">
</redirect>
any url matching mobilePagesRegex is considered mobile friendly and not redirected. "^~/\S+$" denotes anything other than "~/" (site root). So only site root is redirected.
Hope this helps.

shakib
- 5,449
- 2
- 30
- 39