privatebin/etc/nginx/sites-available/redirect-apex-to-www.conf

6 lines
144 B
Plaintext

server {
listen 80;
server_name ~^(?!www.)(?<domain>.+)$;
return {{REDIRECT_CODE}} {{REDIRECT_SCHEME}}://www.$domain$request_uri;
}