Update routing.md (#920)

This commit is contained in:
Kalyn Davis 2023-10-06 07:01:53 -05:00 committed by GitHub
parent 3fa1e50c1d
commit fbd9723a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View File

@ -383,7 +383,7 @@ Für eine Weiterleitung kann es verschiedenste Gründe geben. Mit der Methode *r
req.redirect(to: "/some/new/path")
/// redirect a page permanently
req.redirect(to: "/some/new/path", type: .permanent)
req.redirect(to: "/some/new/path", redirectType: .permanent)
```
Es gibt verschiedene Arten von Weiterleitungen:

View File

@ -424,10 +424,10 @@ req.redirect(to: "/some/new/path")
También puedes especificar el tipo de redirección, por ejemplo para redirigir una página de forma permanente (para que su SEO se actualice correctamente) usa:
```swift
req.redirect(to: "/some/new/path", type: .permanent)
req.redirect(to: "/some/new/path", redirectType: .permanent)
```
Los diferentes `RedirectType` son:
Los diferentes `Redirect` son:
* `.permanent` - devuelve una redirección **301 Moved Permanently**
* `.normal` - devuelve una redirección **303 See Other**. Este es el valor por defecto de Vapor y le dice al cliente que siga la redirección con una petición **GET**.

View File

@ -424,10 +424,10 @@ req.redirect(to: "/some/new/path")
You can also specify the type of redirect, for example to redirect a page permanently (so that your SEO is updated correctly) use:
```swift
req.redirect(to: "/some/new/path", type: .permanent)
req.redirect(to: "/some/new/path", redirectType: .permanent)
```
The different `RedirectType`s are:
The different `Redirect`s are:
* `.permanent` - returns a **301 Permanent** redirect
* `.normal` - returns a **303 see other** redirect. This is the default by Vapor and tells the client to follow the redirect with a **GET** request.

View File

@ -423,10 +423,10 @@ req.redirect(to: "/some/new/path")
U kunt ook het type omleiding specificeren, bijvoorbeeld om een pagina permanent om te leiden (zodat uw SEO correct wordt bijgewerkt) gebruiken we:
```swift
req.redirect(to: "/some/new/path", type: .permanent)
req.redirect(to: "/some/new/path", redirectType: .permanent)
```
De verschillende `RedirectType`s zijn:
De verschillende `Redirect`s zijn:
* `.permanent` - geeft een **301 Permanent** omleiding.
* `.normal` - retourneert een **303 see other** redirect. Dit is de standaard door Vapor en vertelt de client om de omleiding te volgen met een **GET** verzoek.

View File

@ -432,10 +432,10 @@ req.redirect(to: "/some/new/path")
你可以设置重定向的类型,比如说永久的重定向一个页面(来使你的 SEO 正确的更新),请使用:
```swift
req.redirect(to: "/some/new/path", type: .permanent)
req.redirect(to: "/some/new/path", redirectType: .permanent)
```
不同的 `RedirectType` 有:
不同的 `Redirect` 有:
* `.permanent` - 返回一个 **301 Permanent** 重定向。
* `.normal` - 返回一个 **303 see other** 重定向。这是 Vapor 的默认行为,来告诉客户端去使用一个 **GET** 请求来重定向。