I have a web app running on http://domain.com and I just bought another domain http://domain2.com. Both domains are pointing to the same DNS servers and they are both pointing to the same IP address.
What is the best way or how should I setup my Apache config to get http://domain2.com/blah to point to http://domain.com ?
So that...
would be the same thing as
Use an alias ! (Note that
mod_alias
has to be enabled)Create two virtual host entries and point each virtual host's document root to the same path.
Example: