我知道如何redirect到非www的nginx内的单个网站,但我有很多的网站。
那么我怎样才能在全球范围内为他们做这些?
尝试以下操作:
server { server_name "~^www\.(.*)$"; return 301 $scheme://$1$request_uri; }