.htaccess (301 redirects) and subdomains?

Discussion in 'Apache' started by EGS, Aug 19, 2007.

  1. #1
    Hi...

    I have already set up a subdomain on my server. I am wondering how I can accomplish a redirect using .htaccess and/or maybe modrewrite.

    I have to basically redirect site.com/old-name to new-name.site.com. This includes redirecting site.com/old-name/whatever-else-etc to new-name.site.com/whatever-else-etc

    Please help me accomplish this.
    Thank you. :)

    P.S. It should be obvious that the name of the directory (old-name) and name of the subdomain (new-name) are DIFFERENT. ;)
     
    EGS, Aug 19, 2007 IP
  2. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    cyanide, Aug 19, 2007 IP