I am trying to do a redirect using location regex.I want everything to be redirected to 404 exept from the examplesite.com with every possible path and subdomain.examplesite.com should be redirected to my server. examplesite.com redirect https://m.examplesite.com redirect www.examplesite.com/something redirect everything else redirect to 404 This is my config: location ~ ^(by stefanosstef - How to...