Redirect 301 subdomain to domain with full linkage

Discussion in 'Site & Server Administration' started by vexx, Aug 5, 2008.

  1. #1
    I want to redirect sub.domain.com to domain.com, including all url's from the sub.domain.com (eg. sub.domain.com/page25.html etc)

    Any ideas?
     
    vexx, Aug 5, 2008 IP
  2. Estevan

    Estevan Peon

    Messages:
    120
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    0
    #2
    hello

    maybe this help u

    add this in htaccess
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www.domain.com$
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301]

    change the url !

    Best
     
    Estevan, Aug 5, 2008 IP