mscb402 commented on issue #9004:
URL: https://github.com/apache/apisix/issues/9004#issuecomment-1455840316
I think the best way is to create a multi-route to do this.
First route with the host `a.app.m.com` and set a plugin `proxy-rewrite`
with configuration `{'uri':'/a/prod'}`.
Second route with the host `b.app.m.com` and set a plugin `proxy-rewrite`
with configuration `{'uri':'/b/prod'}`.
Like this (This is just a example, you need change it)
```json
{
"methods": ["GET"],
"uri": "/*",
"host": "a.app.m.com"
"plugins": {
"proxy-rewrite": {
"uri": "/a/prod",
}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:80": 1
}
}
}
```
```json
{
"methods": ["GET"],
"uri": "/*",
"host": "b.app.m.com"
"plugins": {
"proxy-rewrite": {
"uri": "/b/prod",
}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:80": 1
}
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]