While this isn't a PHP question, I'll still answer it 🙂
Check out the RewriteRule, Redirect, and RedirectMatch Apache directives.
You can use them like this:
RewriteRule /(.*) http://www.def.com/$1
or
Redirect / http://www.def.com
or
RedirectMatch /(.*) http://www.def.com/$1
Which you use depends on the exact type of action you want taken. RewriteRule and RedirectMatch are essentially the same, but I believe RewriteRule requires that mod_rewrite is enabled.
Hope this helps!
-Rich