• 0

.Net Force redirect


Question

I have a asp/vb .net website that I am shifting to a new server. On the old server, I like to refer the user to a redirection page, if there a general command that will take the user to one specific page if the user enters any point of the old website ? (i.e. somehwere in the webconfig ?)

Thanks, Dave

Link to comment
https://www.neowin.net/forum/topic/475411-net-force-redirect/
Share on other sites

1 answer to this question

Recommended Posts

  • 0

well, you could create a custom 404 page (you can specify this in the web.config) where you put the command Response.Redirect().

If a user requests a file that doesn't exist, it will then redirect you to the right place. This ofcourse has the requirement that you delete/rename/move the original files to a different location, so there are no previous-existing files available (and therefor always generating a 404).

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

  • Recent Achievements

    • Contributor
      GravityDead went up a rank
      Contributor
    • Week One Done
      BlakeBringer earned a badge
      Week One Done
    • Week One Done
      Helen Shafer earned a badge
      Week One Done
    • First Post
      emptyother earned a badge
      First Post
    • Week One Done
      Crunchy6 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      662
    2. 2
      ATLien_0
      269
    3. 3
      Michael Scrip
      236
    4. 4
      Steven P.
      164
    5. 5
      +FloatingFatMan
      149
  • Tell a friend

    Love Neowin? Tell a friend!