diff --git a/_examples/routing/rewrite/main.go b/_examples/routing/rewrite/main.go index 62bec59b..9050e0d3 100644 --- a/_examples/routing/rewrite/main.go +++ b/_examples/routing/rewrite/main.go @@ -31,7 +31,8 @@ func main() { // http://localhost:8080/docs/v12some -> http://localhost:8080/docs // http://localhost:8080/oldsome -> http://localhost:8080 // http://localhost:8080/oldindex/random -> http://localhost:8080 - // http://localhost:8080/users.json -> http://localhost:8080/users?format=json + // http://localhost:8080/users.json -> http://localhost:8080/users.json + // ^ (but with an internal ?format=json, client can't see it) app.Listen(":8080") } diff --git a/_examples/routing/rewrite/redirects.yml b/_examples/routing/rewrite/redirects.yml index 63b68290..546baccf 100644 --- a/_examples/routing/rewrite/redirects.yml +++ b/_examples/routing/rewrite/redirects.yml @@ -12,7 +12,7 @@ RedirectMatch: # REDIRECT_CODE_DIGITS | PATTERN_REGEX | TARGET_REPL - 301 ^(http|https)://test.(.*) $1://newtest.$2 # Handles /*.json or .xml as *?format=json or xml, - # without redirect. See /users route. + # WITHOUT redirect. See /users route. # When Code is 0 then it does not redirect the request, # instead it changes the request URL # and leaves a route handle the request.