I'd like to redirect all traffic from
www.*.*.<gTLD>
to
*.*.<gTLD>
If possible, I'd like to do that outside the block that serves the application. This block does not use a server_name
because it listens to 5,000+ hostnames on the same app.
Do you have an idea on how to achieve that please ? All the example I find is only for named hosts....
Thank you
You can define a
server
block with a regular expressionserver_name
. For example:See this document for more.
With the help of @Richard Smith I came with a result of :
It works well :-)