Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sébastien Richer 194 posts 430 karma points
    Aug 21, 2014 @ 17:09
    S├ębastien Richer
    0

    From the old domain to the new one

    I have this oldsite.com that will now live at newsite.com. I installed the tracker on the new site and I setup my IIS with both oldsite.com and newsite.com bindings. Now I want to setup redirections like this one for example:

    oldsite.com/fr/abc.php --> newsite.com/fr/someverynicepage/

    This works somewhat, but the domain is not included in the redirection. Is there a way to set this up?

    Thanks!

  • Sébastien Richer 194 posts 430 karma points
    Aug 21, 2014 @ 17:16
    S├ębastien Richer
    0

    I've added this code to my master template, it "fixes" my problem, but I'm sure there is a much better way of doing this.

    if (Request.Url.Authority.Contains("oldsite.com"))
    {
        Response.RedirectPermanent("http://newsite.com" + Request.Path);
    }
  • Arie 224 posts 675 karma points
    Oct 12, 2014 @ 05:41
    Arie
    0

    If you have access to IIS you could install Microsoft's IIS URL Rewrite module (http://www.iis.net/downloads/microsoft/url-rewrite). That would probably be the best on-server solution.

Please Sign in or register to post replies

Write your reply to:

Draft