|
| IIS: Typo URLs running existing applications |
 |
Mon, 10 Mar 2008 15:46:03 +000 |
This is more than likely an IIS issue, but these forums have some really
talented developers, so I thought I'd ask here:
We have access to our webserver. We have DNS set up to direct all
*.ourdomain.org to this webserver. From there, within IIS, we can establish web
apps via virtual directory by whatever name we like. app1.ourdomain.org,
app2.ourdomain.org, etc. We came across a problem where if a user puts in
something that doesn't exist, it will run one of our applications (from what I
can tell, the most recently added). So if they put in
http://doesnotexist.ourdomain.org or even http://www.doesnotexist.ourdomain.org
it will run an existing app, while still showing the wrong URL in the nav bar.
We are concerned that this will confuse some of our users.
I tried playing with the default application, and 400 error pages, but nothing
has really solved the problem. Can any IIS gurus shed some light on how to
handle this? If I had my choice, I'd like all typos to go to a specific app,
but I'd be happy just giving them an error page.
|
| Post Reply
|
| Re: IIS: Typo URLs running existing applications |
 |
Mon, 10 Mar 2008 16:33:21 +000 |
You will catch the typo domains on your site that has a blank host header. i.e.
(all unassigned) or a particular IP + port 80 + blank host header. So, that is
the site that you will want to setup a 404 or a redirect. Or, you can create a
site specifically for that.
You can use a 404 page or a httpmodule to watch for typo domains and try to
guess what it should be. Or, you can have 404 page say something like: Opps,
you have found this page in error. You typed but must have meant
something else. Please try again.". In other words, you can dynamically
add the url in your 404 page.
|
| Post Reply
|
| Re: IIS: Typo URLs running existing applications |
 |
Mon, 10 Mar 2008 17:09:54 +000 |
Ahh, blank host header. I see. Yeah, I was setting up all new apps with a
blank host header because I didn't know what it was, nor think it was important.
That looks to have done the trick, thanks!
|
| Post Reply
|
| Re: IIS: Typo URLs running existing applications |
 |
Mon, 10 Mar 2008 21:00:00 +000 |
Great, glad to hear that that works for you.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|