From 05e696785348842aa9aeb0a6bb320e2528146358 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 14 Oct 2013 11:28:57 +0200 Subject: etc/nginx/site.conf: Use exact matches if possible Let Nginx use exact "location" matches whenever possible. diff --git a/etc/nginx/site.conf b/etc/nginx/site.conf index eb8c5e8..9e94bf6 100644 --- a/etc/nginx/site.conf +++ b/etc/nginx/site.conf @@ -59,17 +59,17 @@ server { location = /favicon.ico { root /home/plugins/web/site/resources; } - location ^~ /snapshot { - return 301 /download$request_uri; + location = /doc/release-notes/1-5.html { + return 301 /news/release-1-5.html; } - location ^~ /download/snapshot/nagios-plugins-HEAD.tar.gz { + location = /download/snapshot/nagios-plugins-HEAD.tar.gz { return 301 /download/snapshot/nagios-plugins-master.tar.gz; } - location ^~ /taxonomy/term/2 { + location = /taxonomy/term/2 { return 301 /doc/presentation.html; } - location ~ ^/doc/release-notes/(.*)$ { - return 301 /news/release-$1; + location ^~ /snapshot { + return 301 /download$request_uri; } location ~ ^/(?:man.*|guidelines|extra-opts)$ { return 301 /doc$request_uri.html; -- cgit v0.10-9-g596f