Nginx的尾部斜杠redirect问题

我正在使用Nginx + Varnish运行一个Wordpress网站。 我得到如果我正在添加或删除configuration文件中的尾部斜杠页面不正确redirect错误。 请build议解决scheme删除或添加没有redirect问题的尾部斜杠。 目的是为了避免内容重复问题。 谢谢。 我的nginx conf文件:

server { listen 8080; server_name xyz.de www.xyz.de; root /var/www/html/xyz.de; port_in_redirect off; index index.html index.htm index.php; access_log /var/log/nginx/xyz.de.access.log; access_log /var/log/nginx/xyz.de.apachestyle.access.log apachestandard; error_log /var/log/nginx/xyz.de.error.log; location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } location = /apple-touch-icon.png { access_log off; log_not_found off; } location = /apple-touch-icon-precomposed.png { access_log off; log_not_found off; } location ~ /\. { deny all; access_log off; log_not_found off; } location / { try_files $uri $uri/ /index.php?q=$uri&$args; } location ~ \.php$ { proxy_intercept_errors on; error_page 500 501 502 503 = @fallback; fastcgi_buffers 8 256k; fastcgi_buffer_size 128k; fastcgi_intercept_errors on; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass hhvm; } location @fallback { fastcgi_buffers 8 256k; fastcgi_buffer_size 128k; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass php; } location ~* \.(ico|gif|jpe?g|png|svg|eot|otf|woff|woff2|ttf|ogg|js|css)$ { expires max; } 

}