View Complete Thread
  • URL Redirect with an exception

    Jul 09, 2019 01:45 AM|stc2000|LINK

    Hi, I am new to URL Rewrites and Redirection. Basically I have setup my old web site to redirect to my new web site.

    I used a wildcard pattern (.*) on IIS 10 URL rewrite module with the following condition -  {HTTP_POST} matches www.redirectedsite.com$ and {HTTP_POST)  redirectedsite.com$ and an action to "redirect" to my new site https://www.newsite.com.

    I have also created a DNS A and CNAME record as an alias to the new site:

    DNS Records

    Name   Type       TTL   Value

    @          A           300   (newsite IP address)

    www     CNAME  300   www.newsite.com

    The redirection works and any URL I type in the browser for the old site is redirected to new site, although I need to make an exception for one folder on the redirected site www.redirectedsite.com/subfolder but when I setup another URL Redirect rule for this it doesn't work? Not sure whether I should be creating a new rule for this or not? Any help would be much appreciated as I'm not sure how an exception would work as everything is redirected at the moment.

    Regards

    Alex