79354668

Date: 2025-01-14 10:28:13
Score: 1
Natty:
Report link

It's a bit late to answer, in the end with Ivan's help I made this regular expression. I defined a site with it if a request falls on this site, nginx will remove the subdomain.

 if ($host ~ "^[^.]+\.(?<domain>[^.]+\..+)$") {
      rewrite ^ $scheme://$domain$request_uri permanent;
 }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Victor Sanchez