views:

24

answers:

1

Hi Guys,

I'm really new to apache mod_rewrite module. I have a page called http://abc in my company intranet. I want users to be redirected to http://abc.somecompanyname.com whenever they type http://abc to the URL bar. Could someone please provide and example or point me in the right direction.

I figure this should be quite an easy question to answer. Thanks everyone for you inputs.

-Mark

+1  A: 

You could accomplish that with a VirtualHost definition as simple as this, on the server handling requests for abc:

<VirtualHost *:80>
    ServerName abc
    RewriteEngine on
    RewriteRule ^/(.*)$ http://abc.somecompanyname.com/$1 [R,L]
</VirtualHost>
Joseph Spiros