# Unable to use query parameter (?) in path based routing

**URL:** <https://discuss.konghq.com/t/unable-to-use-query-parameter-in-path-based-routing/8409>\
**Category:** Questions\
**Tags:** kubernetes\
**Created:** [May 19, 2021, 3:58pm UTC](https://discuss.konghq.com/t/unable-to-use-query-parameter-in-path-based-routing/8409 "2021-05-19T15:58:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamil](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@tamil](https://discuss.konghq.com/u/tamil)\
**Post date:** [May 19, 2021, 3:58pm UTC](https://discuss.konghq.com/t/unable-to-use-query-parameter-in-path-based-routing/8409/1 "2021-05-19T15:58:46Z")

</div>

Hello,

I wanted to setup ingress with query parameter on path based routing which does not work if I usethe question mark `?` in URL path.

Basically I have multiple up-streams and I want to route based on path matching string and query parameter.

I am trying to configure ingress in this way, but it does not work when I use `?` in the request URL path.

```auto
spec:
  rules:
  - host: foo.example.com
    http:
      paths:
      - backend:
          serviceName: service-1
          servicePort: 8080
        path: /.*(foo).*

```

It works when use `foo` in URL path as

```auto
curl https://foo.example.com/abcfoo=bar

```

But it does not work if I use query parameter

```auto
curl https://foo.example.com/abc?foo=bar

```

It says “no Route matched with those values”

I also have tried to escape the ‘?’ as `path: /.*\?(foo).*`, in this case it does not match any route and always getting “no Route matched with those values”

Can you please suggest how can I get this working ? is there any plugin I can use ?

Thank you

---

<div class="post-metadata">

**Author:** ![traines](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/traines/32/158_2.png) [@traines](https://discuss.konghq.com/u/traines)\
**Post date:** [May 20, 2021, 10:32pm UTC](https://discuss.konghq.com/t/unable-to-use-query-parameter-in-path-based-routing/8409/2 "2021-05-20T22:32:48Z")

</div>

The stock Kong router doesn’t support routing by query string. Per [this issue comment](https://github.com/Kong/kong/issues/4919#issuecomment-753637494) there is a third-party plugin to handle it.

---

<div class="post-metadata">

**Author:** ![alion-wen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/alion-wen/32/2759_2.png) [@alion-wen](https://discuss.konghq.com/u/alion-wen)\
**Post date:** [May 31, 2021, 9:39am UTC](https://discuss.konghq.com/t/unable-to-use-query-parameter-in-path-based-routing/8409/3 "2021-05-31T09:39:01Z")

</div>

Have you solved this problem
