Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have Outlook Web Access hosted on IIS Windows Server 2003 and the setup is weird from some other dude.

I have Apache listening on 8080

I want users to be able to type in something like: mail.mydomain.com/owa and get redirected the intranet at 192.168.1.1/owa

So my thought was use Apache on the same machine as IIS and have my users type in mail.mydomain.com:8080 and have mod_rewrite to 192.168.1.1/owa

So I created a .htaccess that is:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^$ http://192.168.1.1/owa [R, NC]

I even tried: RewriteRule ^index.html$ http://192.168.1.1/owa [R, NC]

But that doesn't work, I try and hit mail.mydomain.com:8080 and I just get a blank page.

Any traffic on mail.mydomain.com:8080 I want re-directed to 192.168.1.1/owa

What am i doing wrong. Sorry about not doing http // as I am a new user it told me no.

share|improve this question

3 Answers 3

You need use mod_proxy or flag P, redirect doesn't work

RewriteEngine on
RewriteRule ^owa/?(.*) http://192.168.1.1/$1 [L,P]
share|improve this answer

In your httpd.conf file, make sure that the line saying:

AllowOverride None

inside of the <Directory "<htdocs_dir>"> block is changed to:

AllowOverride FileInfo

or

AllowOverride All

This will allow mod_rewrite to function.

Docs, see "Override"

share|improve this answer
    
that gets me part of the way, now I think that my ReWrite rule is not correct as I get an Internal Server error and the log tells me a bad delimiter. Time to see how to do this –  AMM Jul 14 '10 at 5:00

You running an internal DNS? Would be easier to set that address entry to the apache server instead.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.