redirect old bookmarks to main page

A

Adie

Hi, Ive recently updated our companies site and have been looking at
the server logs and it appears a bunch of people are entering the site
at specific pages that no longer exist.

I wonder if there was a way of looking at http requests for the site
and if they are not for an existing page then sending them to
index.aspx?

I'm a bit of a ASP.NET newb, otherwise i'd dig in, but I'm worried
that everyone is gonna think our sites down by the time I figure out
the code.

Thanks

Regards,
Adie -- who should have thought of this...
 
A

Adie

Steve said:
Hi, Ive recently updated our companies site and have been looking at
the server logs and it appears a bunch of people are entering the site
at specific pages that no longer exist.

I wonder if there was a way of looking at http requests for the site
and if they are not for an existing page then sending them to
index.aspx?

I'm a bit of a ASP.NET newb, otherwise i'd dig in, but I'm worried
that everyone is gonna think our sites down by the time I figure out
the code.

You can configure this in IIS.
You can create a custom 404 page that redirects to any page you desire.

Unfortunately the web server belongs o a hosting company.
I'll email them, but I don't think they'll play ball.

Any other thoughts?
 
S

Steve C. Orr [MVP, MCSD]

You can configure this in IIS.
You can create a custom 404 page that redirects to any page you desire.
 
S

Showjumper

You can do this via the global.asax file or better yet, create a custom
errors page and specify the page in the web.config page. In the codebehind
for the custom error page you can find the old url and then redirect to the
new url. As a live example visit
http://www.riderdesign.com/tutorials/default.aspx and you will see it send
you to a new page. The error page handles the redirect.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top