|
| Forcing 404 responses for all requests. |
 |
Thu, 14 Feb 2008 12:53:39 +000 |
Hi folks, I might try this one over a microsoft too but I'm in the process of
migration a seriers of html portals and web apps from one server to another
newer server. I know I have a lot of references into the old server from a tonne
of places including my companies intranet so I had the idea of forciing our old
server to return a 404 error code for each request, this will then get picked up
a 'broken' links by our enterprise search tool. I can then find the source of
all links pointing into our existing server and update them to our new one.
Question is though, is this possible? Our scripts are PHP, but we also just have
a tonne of htmls, .doc. gifs etc on the existing server so I guess it would have
to be done on the IIS level. Ideally I would like the browser to get a 404 but
still display the page if it in fact existed. Thanks in advance for your help.
|
| Post Reply
|
| Re: Forcing 404 responses for all requests. |
 |
Thu, 14 Feb 2008 22:07:39 +000 |
How about using your IIS log files? If you use Log Parser you can run a query
like this:
logparser.exe "select top 10 cs-uri-stem, count(cs-uri-stem) as Count from
<sitename> group by cs-uri-stem order by count(cs-uri-stem) desc"
That will give you a list of all calls to pages sorted by the most commonly
called to the least commonly called. From there you can start to look at the
referrer and other information to know what you should update.
IIS doesn't have a way to throw a 404 error and still pass through the page.
IIS7 will be better for the method that you suggested since you can write a
module for all page types, but IIS6 doesn't have an easy solution for what you
suggested.
Thanks,
Scott
|
| Post Reply
|
| Re: Forcing 404 responses for all requests. |
 |
Fri, 15 Feb 2008 08:40:23 +000 |
Hi Scott thanks for your input on this. How do I use the log parser, I'm not
familir with this. Do i just do a cmd and then type the command or is there a
snap in kind of interface somewhere.
Another suggestion I got was to override the default 404.html in iis and set it
to somethign like 404.aspx which I believe I can then force programmatically to
return a 404, but perhaps the browser wouldn't understnad this and would still
show default 404 page.
I've set up one or two redirects from old server to new server, but i wondering
which server would show 302 in logfiles.
I like he logparser tool idea though, never heard of it before, seems very
SQLish.
Thanks for your helps
|
| Post Reply
|
| Re: Forcing 404 responses for all requests. |
 |
Fri, 15 Feb 2008 11:54:50 +000 |
All your questions are answered at www.iis.net... :)
Jeff
|
| Post Reply
|
|
|
|
|
|
|
|
|
|