mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 09:57:01 +00:00
add a note on rewrite middleware for local URL modifications
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user