Redirecting default web site to a directory below URL entered

Have a W2K3 SP1 server with Exchange 2K3 SP1 running on it.
Also have OWA configured on this box.

Am trying to get IIS to redirect my users to a sub-directory when the users enter "mail.underpantsgnome.com" in their browsers.

What I have done is:

1. Using IIS Manager, right-click on default web site and select properties.
2. Select the Home Directory tab.
3. Select "A redirection to a URL".
4. Entered "/exchange" in the field labeled "Redirect to:"
5. Selected "A directory below URL entered" under "The client will be sent to:".
6. Closed all windows and restarted IIS services.

When attempting to access OWA from outside the company network the user gets a "Cannot find server or DNS Error".

Have examined the W3SVC1 log and have found multiple entries of "302.0.5".

I know that a 302 refers to a redirection error.
Am not sure what to do to rememdy this.
Have I taken a wrong approach in redirecting my users the /exchange sub-directory?

Any help is appreciated.

Thank you,

Mike
keatsconAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

humeniukCommented:
Change the redirect from '/exchange' to 'http://www.domain.com/exchange', ie. include the whole URL, and select 'The exact URL entered above' & un-select 'A directory below this one'.

This should get the redirect working.  Make sure that works and then we can look at the OWA problem.
keatsconAuthor Commented:
humeniuk,

Tried changing the redirect from '/exchange' to 'http://mail.underpantsgnome.com/exchange'.
This resulted in the client browser hanging and the W3SVC1 log file being filled with numerous 302.0.5 errors.

Changed the config back to what it was and tried again. Instead of getting multiple 302.0.5's I recieved
a single 302.0.0 then a single 302.0.5.  
The client browser registered a 'Cannot find server or DNS Error'.

Thank you,

Mike


humeniukCommented:
Is this from inside the network or outside?
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

keatsconAuthor Commented:
The setup I currently have works like a champ when accessing OWA from the internal network.

When a user, out on the Internet, tries to access OWA that is when the 302's start showing up in the W3SVC1 log.

My firewall log shows the user trying to access the internal web server and as far as I can tell it is allowing the traffic to pass through to the OWA server.

Am starting to think that this is an issue with my firewall config.

sreeraoCommented:
Hi Keatscon,
If you have installed the exchange server on the same machine as the IIS box, you will have the /exchange created for you already. But anyway, how did you reset the IIS? Using the MMC way or from the command line? Issue a cmd "iisreset" from the command prompt to reset IIS (I am sure that you have already done that, but just confirming).
Also, what is your existing /exchange virtual root pointing to (that must have got installed with Exchange 2003).

Regards.
-Sree


bigbillydotcomCommented:
first look here for the ports to open - http://www.petri.co.il/ports_used_by_exchange.htm
but what ive seen is that the ports are more in a range than using the published ports
make sure you test this with multiple users cause I have seen additional ports open once another user tries to connect
for that, try downing your firewall and using netstat to watch the ports and see whats being opened

good luck
bigbillydotcomCommented:
BTW - I thinks its a firewall issue too, since it is working internal but not external
sreeraoCommented:
:) Sorry, didn't read the post of keatscon about the successful access from internal. Disregard my previous post. I think bigbillydotcom's post is appropriate indicating the firewall port opening recommendation.

-Sree
humeniukCommented:
Connecting to OWA through a firewall is a bit more complex than just connecting to a web server and requires some specific configuration.  Take a look at "How to configure OWA to connect to Exchange through a firewall" - http://support.microsoft.com/kb/259240.


"Tried changing the redirect from '/exchange' to 'http://mail.underpantsgnome.com/exchange'.
This resulted in the client browser hanging and the W3SVC1 log file being filled with numerous 302.0.5 errors."

If you are redirecting the site (as I understood from your question), it makes sense that this would happen because the destination is redirected as well creating a loop and the numerous errors.  Something to try - create a default document, it can be anything, and configure IIS to use it.  Then right-click the document in IIS Manager, select properties and look under the 'File' tab.  There you can configure 'A redirection to a URL' as above and there shouldn't be a loop.

kiddangerCommented:
I believe it might be an external DNS issue.  You're not mixing internal/external DNS on the same box, are you?

c:\who>nslookup -q=ns underpantsgnome.com
Server:  <censored>
Address:  192.168.0.9

Non-authoritative answer:
underpantsgnome.com     nameserver = ns1.moensolutions.com
underpantsgnome.com     nameserver = ns2.qogo.com
underpantsgnome.com     nameserver = ns1.qogo.com

ns1.moensolutions.com   internet address = 67.43.163.186
ns2.qogo.com    internet address = 66.51.208.122
ns1.qogo.com    internet address = 67.43.163.162

c:\who>nslookup -q=mx underpantsgnome.com ns1.moensolutions.com
(root)  nameserver = A.ROOT-SERVERS.NET
(root)  nameserver = B.ROOT-SERVERS.NET
(root)  nameserver = C.ROOT-SERVERS.NET
(root)  nameserver = D.ROOT-SERVERS.NET
(root)  nameserver = E.ROOT-SERVERS.NET
(root)  nameserver = F.ROOT-SERVERS.NET
(root)  nameserver = G.ROOT-SERVERS.NET
(root)  nameserver = H.ROOT-SERVERS.NET
(root)  nameserver = I.ROOT-SERVERS.NET
(root)  nameserver = J.ROOT-SERVERS.NET
(root)  nameserver = K.ROOT-SERVERS.NET
(root)  nameserver = L.ROOT-SERVERS.NET
(root)  nameserver = M.ROOT-SERVERS.NET
*** Can't find server name for address 67.43.163.186: No information
Server:  UnKnown
Address:  67.43.163.186

DNS request timed out.
    timeout was 2 seconds.
underpantsgnome.com     MX preference = 10, mail exchanger = mail.moensolutions.
com
underpantsgnome.com     nameserver = ns1.moensolutions.com
underpantsgnome.com     nameserver = ns2.qogo.com
underpantsgnome.com     nameserver = ns1.qogo.com
mail.moensolutions.com  internet address = 67.43.163.186
ns1.qogo.com    internet address = 67.43.163.162
ns1.moensolutions.com   internet address = 67.43.163.186
ns2.qogo.com    internet address = 66.51.208.122

Where is the entry for mail.underpantsgnome.com?
keatsconAuthor Commented:
What I listed as the domain was meant to be fictitious. It was taken from a South Park episode that was about Tweek and his underpants being stolen by gnomes.  

Connecting to OWA through a firewall is not a big deal. It entails opening the ports 80 & 443 and making sure the traffic targeted to the external IP is routed to the internal server handling OWA. How this is done is dependent upon the firewall and software being used.

In any event I was able to get everything working and thank you all for your assistance.

The issue was a matter of deleting the old DNS entries (internal DNS) and creating an A record for the new OWA server and of changing the config on my firewall so that traffic flowed to and from the corect server.  
 
humeniukCommented:
Glad to hear everything is worked out.

And I must have missed that SP episode :)
kiddangerCommented:
keatscon...

Nice to hear you have it worked out but please let us know what is accurate and what is bogus when you post references.  It's also probably not a good idea to post references to a public domain that is not part of the discussion.  Not being a SouthPark fan, I had no idea anything you posted was bogus.

moduloCommented:
Closed, 125 points refunded.
modulo
Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.