Redirections Question

  • Thread starter Thread starter Just Me
  • Start date Start date
J

Just Me

Hi,

Ive just been converting a site which was written in frontpage to asp.net.
Because it was a public site and had been googled etc, now we have done the
conversion, there are a lot of page not found's reported. But we dont want
hundreds of old htm pages knocking around.

Is there a single file you can add somewhere with a list of redirections. so
that when pp request a page it ca be redirected to the appropriate new
resource.

Thanks
 
You can add something like this in your config file:

<customErrors mode="On" defaultRedirect="~/errors/GeneralError.aspx">
<error statusCode="404" redirect="~/errors/PageNotFound.aspx" />
</customErrors>

In PageNotFound.aspx you can write logic to redirect someone to the new
page.
 
Thank you very much


Just somebody else said:
You can add something like this in your config file:

<customErrors mode="On" defaultRedirect="~/errors/GeneralError.aspx">
<error statusCode="404" redirect="~/errors/PageNotFound.aspx" />
</customErrors>

In PageNotFound.aspx you can write logic to redirect someone to the new
page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top