1 Reply Latest reply on Feb 13, 2010 4:11 AM by Joeyb

    need assistance w/ 301 subdomain code

    appstate98 Level 1

      Hi... here's my current .htacess code:


      ErrorDocument 404 /404.php
      RewriteEngine on
      rewritecond %{http_host} ^test2.domain.com [nc]
      rewriterule ^(.*)$ http://www.domian.com/$1 [r=301,nc]



      I used the test2 subdomain for testing the website before we launched.  Now Google has indexed all the pages on the test2 subdomain.  I'm trying to redirect the pages on the test2 to go to the www.domain.com directory.




        • 1. Re: need assistance w/ 301 subdomain code

          This is just a shot in the dark, but since no one else has replied...


          Are you using lower case flags on your Web server, or did you just use lower case for this example? I've never seen lower case flags like r= being used.


          Maybe it's redirecting, but the 301 status flag isn't working properly? If you haven't done so, you may want to check your test2 headers with a tool like this: http://gsitecrawler.com/tools/Server-Status.aspx or download some freeware to do it.


          Lastly, do you ever use the google webmaster tools? http://www.google.com/webmasters/ You have some control over how google indexes your site and I think you can fix problems like this, or at least have google re-index after you fix the problem.


          I hope this helps you somehow. Let me know.