Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note about redirection rule to precise how regex/replacement work. #2243

Merged

Conversation

nmengin
Copy link
Contributor

@nmengin nmengin commented Oct 10, 2017

Description

The mechanism used to redirect URLs between entrypoints does not use the fields regex and replacement, which are overriden if defined.

The PR adds precision about this point in documentation.

@@ -34,6 +34,9 @@ To redirect an http entrypoint to an https entrypoint (with SNI support).
KeyFile = "integration/fixtures/https/snitest.org.key"
```

!!! note
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of !!! can we use bolding or some sort of markdown based notification ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use !!! as Markdown syntax, it's related to our new documentation theme : http://squidfunk.github.io/mkdocs-material/extensions/admonition/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So sorry about that, didn't know!

@@ -34,6 +34,9 @@ To redirect an http entrypoint to an https entrypoint (with SNI support).
KeyFile = "integration/fixtures/https/snitest.org.key"
```

!!! note
`regex` and `replacement` have not to be set in `redirect` structure during entrypoint redirection (they are not used).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the wording:

Please note that regex and replacement do not have to be set in the redirect structure if an entrypoint is defined for the redirection (they will not be used in this case)

@@ -47,6 +50,9 @@ To redirect an entrypoint rewriting the URL.
replacement = "http://mydomain/$1"
```

!!! note
`regex` and `replacement` are not used during entrypoint redirection (if `entrypoint` is set in `redirect` structure).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the wording:

Please note, if you have regex and replacement used to rewrite a URL, ensure that you do not have entrypoint defined in the redirect structure, or they will be ignored (as noted above).

Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
:shipit:

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@traefiker traefiker force-pushed the feature/redirection-precisions-doc branch from 7273915 to 18992d1 Compare October 22, 2017 07:32
@traefiker traefiker merged commit 6bce298 into traefik:master Oct 22, 2017
@nmengin nmengin deleted the feature/redirection-precisions-doc branch August 3, 2018 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants