From 74f40bebe8188d02858f2131a57d5944fd053d0a Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Fri, 24 Mar 2023 17:26:15 +0400 Subject: [PATCH] Wiktionary: Nginx config, nbsp -> normal spaces --- wt/index.html | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/wt/index.html b/wt/index.html index 1869cf6..510bf67 100644 --- a/wt/index.html +++ b/wt/index.html @@ -14,13 +14,29 @@ wt.dc09.ru/abc -  redirects to  + redirects to ru.wiktionary.org/wiki/abc -
<VirtualHost *:443>
+            
# Wiktionary Redirect for Nginx
+server {
+    listen 443 ssl http2;
+    listen [::]:443 ssl http2;
+
+    server_name wt.dc09.ru;
+
+    location /!about {
+        return 301 https://dc09.ru/wt;
+    }
+
+    location / {
+        rewrite ^/(.*) https://ru.wiktionary.org/wiki/$1;
+    }
+}
+
# Wiktionary Redirect for Apache httpd
+<VirtualHost *:443>
     ServerName wt.dc09.ru
     <LocationMatch "^(?!/!about)">
             RedirectMatch /(.*) https://ru.wiktionary.org/wiki/$1