# Kong Rewrite URL

**URL:** <https://discuss.konghq.com/t/kong-rewrite-url/4959>\
**Category:** Questions\
**Created:** [November 20, 2019, 11:32pm UTC](https://discuss.konghq.com/t/kong-rewrite-url/4959 "2019-11-20T23:32:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryborg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/ryborg/32/695_2.png) [@ryborg](https://discuss.konghq.com/u/ryborg)\
**Post date:** [November 20, 2019, 11:32pm UTC](https://discuss.konghq.com/t/kong-rewrite-url/4959/1 "2019-11-20T23:32:27Z")

</div>

Is it true that Kong Community Edition can’t rewrite url paths without using 3rd party or custom plugins? The documentation for the Request Transformer and Request Transformer Advanced seem to suggest this.

For example:

- Request for /useful-endpoint arrives at Kong
- Kong transforms uri path to /api/useful-endpoint and sends the request to a proxied server.

I’m surprised (and disappointed) that this is considered “Enterprise” level functionality.

Is there something obvious I’m missing?

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [November 21, 2019, 7:48pm UTC](https://discuss.konghq.com/t/kong-rewrite-url/4959/2 "2019-11-21T19:48:58Z")

</div>

No. This is not an Enterprise feature. It has been a feature in Kong even before the enterprise product even existed.

You can create a route with `/useful-endpoint` as one of the paths, and then in the service entity, set the `path` property to `/api`.

Docs here:

> **[Open-Source API Management and Microservice Management](https://docs.konghq.com/1.4.x/admin-api/#route-object)**
>
> Secure, Manage & Extend your APIs or Microservices with plugins for authentication, logging, rate-limiting, transformations and more.

> **[Open-Source API Management and Microservice Management](https://docs.konghq.com/1.4.x/admin-api/#service-object)**
>
> Secure, Manage & Extend your APIs or Microservices with plugins for authentication, logging, rate-limiting, transformations and more.

---

<div class="post-metadata">

**Author:** ![ryborg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/ryborg/32/695_2.png) [@ryborg](https://discuss.konghq.com/u/ryborg)\
**Post date:** [November 21, 2019, 8:48pm UTC](https://discuss.konghq.com/t/kong-rewrite-url/4959/3 "2019-11-21T20:48:47Z")

</div>

Excellent! I was definitely confused, I can see where I went wrong now. I couldn’t imagine that would be something only found in Enterprise. Thanks for taking a moment to answer my question.

---

<div class="post-metadata">

**Author:** ![ryborg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/ryborg/32/695_2.png) [@ryborg](https://discuss.konghq.com/u/ryborg)\
**Post date:** [November 22, 2019, 5:00pm UTC](https://discuss.konghq.com/t/kong-rewrite-url/4959/4 "2019-11-22T17:00:28Z")

</div>

What about scenarios where path variables are involved?

- Request for /new/123/info arrives at Kong (where 123 could be any numeric type id)
- Is modified to /legacy/123/detail

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [November 22, 2019, 9:22pm UTC](https://discuss.konghq.com/t/kong-rewrite-url/4959/5 "2019-11-22T21:22:14Z")

</div>

`request-transformer-advanced` capabilities are now available in the open-source `request-transformer` plugin (the docs are out of date, unfortunately).

You can use regex captures and substitution for your use-case:

> **[Open-Source API Management and Microservice Management](https://docs.konghq.com/hub/kong-inc/request-transformer-advanced/0.33-x.html)**
>
> Secure, Manage & Extend your APIs or Microservices with plugins for authentication, logging, rate-limiting, transformations and more.

---

<div class="post-metadata">

**Author:** ![alebruck](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/alebruck/32/1446_2.png) [@alebruck](https://discuss.konghq.com/u/alebruck)\
**Post date:** [November 27, 2019, 3:52pm UTC](https://discuss.konghq.com/t/kong-rewrite-url/4959/6 "2019-11-27T15:52:51Z")

</div>

Hello @hbagdi, those are great news. As this is not documented, could you share the codebase that was integrated into request-transformer from request-transformer-advanced?

We were looking at [https://github.com/Kong/kong-plugin-request-transformer](https://github.com/Kong/kong-plugin-request-transformer) and couldn’t spot new changes.
