|
Greetings: I'm looking for an example of a .htaccess for use in the following situation. As well as comments on whether the methodology listed below is sound.
1. The hosting platform I have is unix shared hosting 2. I've setup two subfolders under the htdocs folder with the intention of having two websites under this hosting package 3. I've created a subfolder for a new website that has a new domain name. For example XYZ.com is in the xyz folder. This domain/website is meant to replace an old website with a different domain name. 4. I've created a subfolder for the old domain. We will call this abc.com 5. The old website abc.com is hosted by another company at the moment. I intend on pointing this old domain to the XYZ folder I created under my hosting package. (After I transfer the domain to Network solutions) 6. Within the ABC folder for this old site, I'll have an .htaccess. The .htaccess folder will 301 redirect the old domain and the webpages that are associated with the old domain ABC.com to the new domain/website XYZ.com.
I've written .htaccess files before. But its been sometime since I did this. From what I gather the .htaccess should look like the following: RewriteEngine on RewriteRule ^www.abc.com$ /www.xyz.com RewriteRule ^www.abc.com/anypagesthatIwantredirect.html$ /www.xyz.com/anypagesthatIwantredirect.com
So my questions are: A. Is my methodology sound?
B. Is that the correct form for the htaccess file?
Thanks Tim
|