[Fixed]-Rewrite `example.com/foo/bar` to `foo.example.com/bar` with nginx. Redirect loop

1👍

This might be a solution to your bonus question (i.e. how to block /foo/bar from www.example.com):
https://stackoverflow.com/a/4677893/2319697

Basically just return 404 if the pattern/location is matched

👤iver56

Leave a comment