Forum Moderators: phranque
How does one do that when the site has 1000's of HTML pages? Is the only way to end up with a .htaccess with 1000's of entries?
If so, how in the heck does one get all those redirect lines into the .htaccess? Is there a way to automate the generation of the file? Your help is greatly appreciated.
If the domains share folders in the same "account" on a server, then only two lines of code will be required (not counting one or two possibly-required "setup" lines).
Try a site search for domain redirect 301 [google.com] -- We've discussed this subject in thousands of threads.
See the Apache documentation for mod_alias and mod_rewrite; You may use either if the domains are separately-hosted, while mod_rewrite will be required if they share folders in the same server "account".
For additional information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim
Yes I did and have read most of the threads suggested previously, and now re-read them again. :)
I WAS clear on the issue until the 301 thread of Matt Cutts that has been cited many times here as well stating the redirect of every single page vs. the one line redirect. Perhaps I misunderstood his thread. I did however do the single entry and will watch how Google handles them.
Jon
Added: You should not be waiting around for a robot to visit to verify that this works. Use the "Live HTTP Headers" extension for Firefox and Mozilla browsers, and test thoroughly. You might also want to try the "User-agent Switcher" and/or the "Prefbar" extensions so that you can spoof Googlebot and other spiders (copy the correct user-agent strings from your raw server access log file). These two extensions are part of a very good no-cost toolbox for testing such things.
Jim
[edited by: jdMorgan at 9:29 pm (utc) on Aug. 13, 2007]