Skip to content

Commit

Permalink
fix(nginx): add redirect rules to avoid duplicate content
Browse files Browse the repository at this point in the history
  • Loading branch information
developmentforpeople authored and Thunderbottom committed Dec 7, 2019
1 parent 63737e3 commit 7051aa3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bench/config/templates/nginx.conf
Expand Up @@ -59,6 +59,10 @@ server {

location / {

rewrite ^(.+)/$ $1 permanent;
rewrite ^(.+)/index\.html$ $1 permanent;
rewrite ^(.+)\.html$ $1 permanent;

location ~ ^/files/.*.(htm|html|svg|xml) {
add_header Content-disposition "attachment";
try_files /{{ site_name }}/public/$uri @webserver;
Expand Down

0 comments on commit 7051aa3

Please sign in to comment.