This commit is contained in:
caiyixiang 2017-03-14 19:19:21 +08:00
parent 041f269770
commit 3b152e6aa7

View file

@ -202,7 +202,7 @@ func buildLocation(input interface{}) string {
path := location.Path path := location.Path
if len(location.Redirect.Target) > 0 && location.Redirect.Target != path { if len(location.Redirect.Target) > 0 && location.Redirect.Target != path {
if path == "/" { if path == slash {
return fmt.Sprintf("~* %s", path) return fmt.Sprintf("~* %s", path)
} }
return fmt.Sprintf("~* ^%s", path) return fmt.Sprintf("~* ^%s", path)