0

I am struggeling with ReDJ to configure redirection.

I want to redirect all URLs except given once.

e.g.

https://www.example.com/something
https://www.example.com/something/abc
https://www.example.com/something/abc?id=0815
https://www.example.com/somethingOther
https://www.example.com/somethingOther/cba
https://www.example.com/somethingOther/cba?id=0816

to a subdomain lets say

https://mysub.example.com/...

But I do not want to redirect

https://www.example.com/path1
https://www.example.com/path2
https://www.example.com/otherPath

Hope someone can help?

  • Do you mean? /https:\/\/www.example\.com\/(?!otherPath|path[12]).*/? I don't have ReDJ, so I don't know what you are after. – mickmackusa Oct 2 at 12:35
  • sadly this regex did not work. I need to do some cleanups for SEO with category links – cilap Oct 3 at 1:51
  • You can trial your regex patterns on regex101.com if you know all of the actual strings. It's nearly impossible to provide a quality regex pattern based on hypothetical urls. – mickmackusa Oct 3 at 21:07
  • my assumption with regex was: www.example.com(/path1|path2|/otherPath) and to add negates to the paths in the braces, but I did not find a valid negate variant. – cilap Oct 4 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.