소스 검색

[Nginx] Catch case-insensitive /sogo$ request and redirect to /SOGo

andryyy 5 년 전
부모
커밋
0e6dfdd0fe
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      data/conf/nginx/includes/site-defaults.conf

+ 4 - 4
data/conf/nginx/includes/site-defaults.conf

@@ -166,10 +166,6 @@
     client_max_body_size 0;
   }
 
-  location ~ /(?:S|s)ogo$ {
-    return 301 $client_req_scheme://$http_host/SOGo;
-  }
-
   location ^~ /SOGo {
     include /etc/nginx/conf.d/sogo_proxy_auth.active;
     include /etc/nginx/conf.d/sogo.active;
@@ -186,6 +182,10 @@
     break;
   }
 
+  location ~* /sogo$ {
+    return 301 $client_req_scheme://$http_host/SOGo;
+  }
+
   location /SOGo.woa/WebServerResources/ {
     alias /usr/lib/GNUstep/SOGo/WebServerResources/;
   }