locked
Recognize org or com and redirect RRS feed

  • Question

  • User1510859543 posted

    Our asp.net site needs to accept either url for (as example) www.website.org or www.website.com and redirect accordingly.  Is there an easy way to accomplish that in a Default.aspx page?  We are using .net framework 4.  Thanks.

    Sunday, October 19, 2014 8:41 AM

Answers

  • User-760709272 posted

    Look at

    Request.Url.Authority

    and it'll contain the domain name and you can do a redirect based on that.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, October 19, 2014 8:46 AM