Redirection Handling

D

danielhamd

Here is my setup:

I have a hosts file setup on the users machine that takes, for
example, www.youtube.com and redirects it to 127.0.0.1. On the local
machine is an IIS server that I would like to handle this youtube
request. So far so good, I can get the request for www.youtube.com
and print out something like "You tried to access www.youtube.com"
from Default.aspx. However, what about the case when a user tries to
access http://www.youtube.com/video1.aspx or
In these cases the IIS server returns "Resource not found" or
something similar, depending on the document being requested.

My question is, how do I set up asp.net and the IIS server to handle
all requests, so I can have it then say "You tried accessing
."

If this isn't clear in some way please let me know and I'll elaborate.

Thanks!

-Daniel
 
D

danielhamd

I've tried this, however it doesn't seem to work when someone requests
an .aspx page. That gives a seperate sort of "server error." Is
there a way to set up a handler for that as well?

-Daniel
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top