0

I'm trying to get domain.fi and domain.com to point to the same DocumentRoot, without the domain changing in the browser url. Is that possible with Apache?

I've got the both domains pointing to the same DocumentRoot and working, but the domain.com changes to domain.fi in the browser url.

HBruijn
  • 84,206
  • 24
  • 145
  • 224

1 Answers1

1

Use a Redirect to domain.com within the VirtualHost for domain.fi. For this to work mod_alias must be loaded.

<VirtualHost 127.0.0.1>
        ServerName www.domain.fi
        ServerAlias doman.fi
        RedirectMatch (.*) http://www.domain.com/
</VirtualHost>

You could also specify any standard VirtualHost settings desired, such as CustomLog.

Warner
  • 24,174
  • 2
  • 63
  • 69