Q: How do I pont one domain name to another domain name with .htaccess ??
A: The smoothest way to redirect your visitors is to use an .htaccess redirect. This has no delay since before a page is served to the browser the server checks first for an .htaccess file... if it sees this the old page never loads, instead visitors are sent directly to the new page.
If you're more technically minded than I am and want the information straight from the source, check the Apache Tutorial: .htaccess files for more detailed info.
Important notes about htaccess redirection
- Always be sure to upload .htaccess files in ascii mode, sending it up as binary will break it (and usually make your server very, very unhappy.)
- Make sure your ftp program will show .htaccess files (FileZilla does and is free) It is a bit hard to edit something you can't see ;)
- Double check that you're not overwriting an old one (some servers already place one there for your custom 404 pages etc.)
Instructions
Open notepad and add this line of text at the top.
Redirect 301 / http://www.example.com/
Save the text file as htaccess.txt
Upload the text file to the root directory of the web site you are trying to redirect.
rename the file .htaccess - yes that is a "." before htaccess and nothing after htaccess
You're all set.