Who can help me with regex rule?
If visited page is https://example.com/shop/product then I need to redirect user to https://example.com/product, but if visited page is https://example.com/shop/page/2 I need to do nothing.
There is possibility, that user landed on https://example.com/shop/category/child-category/product and for this example I need to redirect to https://example.com/category/child-category/product
I have already wrote this rule: RewriteRule ^shop/(.*)$ /$1 [R=301,L], but this rule redirects user from this page if he is in second or other pages.
/shop/page/2then I don't need to redirect, but if user landed on page which is/shop/category/product, then I need to redirect to/category/product. So rule need to check if there is keywordpagethen do nothing, but if there is then do redirect.