1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Redirection page from subdomain to other subdomain

Discussion in 'Apache' started by bra_mik, May 11, 2015.

  1. #2
    Wordpress installation (WPML with 3rd level domain es. site. com, fr. site. com).

    I need to redirect page from subdomain to a new subdomain
    SEMrush
    Example:
    esp.site.com/oldpage -> es.site.com/newpage (different subdomain)
    esp.site.com/oldpage1 -> es.site.com/newpage
    esp.site.com/oldpage2 -> es.site.com/newpage

    Source site is very chaotic and there are no clear rule for redirection (no regex )
    So I need to redirect every page but syntax:

    Redirect 301 esp.site.com/oldpage http:// es.site.com/newpage

    doesn't work!

    which is the correct syntax ?

    Can I manage all from one .htaccess file in main root (www) or should I create "esp" directory (and point old subdomain to it - one for every language) and put .htaccess in every directory with redirection ?
     
    bra_mik, May 11, 2015 IP
    SEMrush
  2. Andrew Shaw

    Andrew Shaw Member

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #3
    This should just be

    Redirect 301 /oldpage http://newsite.com/newpage in the root of the old site
     
    Andrew Shaw, May 30, 2015 IP