I just created a redirect with regular expression. I used to have hundreds of sub categories and now my new URL has one static word "catalog" instead 0f directories.
OLD URLS were: example.com/main-category/dynamic-category/product.aspc
NEW URL Are: example.com/main-category/static-catagory/product.aspx
I used This expression for redirect:
^main-category/([_0-9a-z-]+)/([_0-9a-z-]+).aspx
Any category plus Any product.aspx should be redirected to
main-category/static-category/{R:1}.aspx
Now Issue is the redirect loop as this expression is also redirecting static category name to itself because of([_0-9a-z-]+)
So my question is "How to exclude one particular directory (static-category) from over all regular expression.
Please help