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.

Centos 5.2, Apache 2.2.3

I want to configure Apache to redirect any URL under mail.mydomain.com to the single URL https://mail.google.com/a/mydomain.com

How can I set this up with Apache? I have

LoadModule rewrite_module modules/mod_rewrite.so

but I'm not sure how to actually use this and I can't find a really simple example; I assume I set up a new virtual host with some form of rewrite directive, but how is this done?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

put a .htaccess in the document root and then put this in it :

RewriteEngine on
RewriteRule $ https://mail.google.com/a/mydomain.com [L]

or you can do the above in the VHost definition.

share|improve this answer
    
Perfect - I did this in the vhost definition. –  DrStalker Mar 23 '10 at 0:48

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.