Commits

Alexey Rakeev  committed 964d9ce Draft

Fixed trailing slash redirects

  • Participants
  • Parent commits a4a2fcd

Comments (0)

Files changed (1)

File conf/domain.conf

 
 	location / {
 		PROXY
+		proxy_redirect http://$host:$eport/ /;
 		proxy_set_header Host			$host:$eport;
 		proxy_set_header X-Real-IP		$remote_addr;
 		proxy_set_header X-Forwarded-For	$proxy_add_x_forwarded_for;
 
 		# Burst request rate for possible onload AJAX/generated resources
 		limit_req zone=reqz burst=16;
-
-		if (-d $request_filename) {
-			rewrite ^(.*[^/])$ $1/ permanent;
-		}
 	}
 	location ~ /\.ht {
 		deny all;
 	# Allow PHP for standard applications
 	location ~* ^/(webmail|squirrelmail|roundcube|phpmyadmin) {
 		proxy_pass http://ADDR:$iport;
+		proxy_redirect http://$host:$eport/ /;
 		proxy_set_header Host			$host:$eport;
 		proxy_set_header X-Real-IP		$remote_addr;
 		proxy_set_header X-Forwarded-For	$proxy_add_x_forwarded_for;
 		limit_req zone=reqz burst=4;
 
 		root /var/www/html;
-		if (-d $request_filename) {
-			rewrite ^(.*[^/])$ $1/ permanent;
-		}
 	}
 }