301 redirect from old domains url to new domains new url

25 Views Asked by At

URL redirections are not happening. I have 2 different url(old/new)

old: https://olddomain.com/oldarticlecategory/

new: https://newdomain.com/newurlcategory/

Note: I've already created a rule that redirects articles in the old category to articles in the new domain. Below is the code snippet to configure the code. Now I have to write one more rule on top of this. Any suggestions. I'm using web.config

<rule name="redirect personalities" enabled="true">
<match url="^oldarticlecategory/(.*)" />
    <conditions>
        <add input="{HTTP_HOST}" negate="true" pattern="https://olddomain.com/oldarticlecategory" />
    </conditions>
<action type="Redirect" url="https://newdomain.com/newurlcategory/{R:1}" appendQueryString="true" redirectType="Permanent" />

The above code snippet I wrote to achieve below.

Old Url: https://olddomain.com/oldarticlecategory/article-details

New Url: https://newdomain.com/newurlcategory/article-details

0

There are 0 best solutions below