Skip to content

docs: we can configure the uri field in redirect plugin with the host #7945

Description

@starsz

Current State

Hello, when I read the doc of the "redirect" plugin, https://apisix.apache.org/docs/apisix/plugins/redirect/
I can't get find the way that we can configure the redirect to a url like this https://apisix.apache.org/docs
But in fact, we support it.

For example:

curl http://127.0.0.1:9180/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '{
    "methods": ["GET"],
    "uri":"/*",
    "host":"test.com",
    "plugins":{
        "redirect":{
            "ret_code":301,
            "uri":"https://apisix.apache.org/docs"
        }
    }
}'

image

Desired State

So I want to add some description of configuring the uri with the host head.
Else it will mislead users that we don't support it.

Metadata

Metadata

Assignees

Labels

docDocumentation thingsgood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions