I want to make a server block, or location block (not sure which works) using regex to redirect all domains with www to the same without www.
something in this lines:
server_name ~^(www\.)?(?<domain>.+)$;
rewrite ^ http://$domain$request_uri? permanent;
Any help would be great
something in this lines:
server_name ~^(www\.)?(?<domain>.+)$;
rewrite ^ http://$domain$request_uri? permanent;
Any help would be great