# How to change link /my\_product\_url?p = some\_parameter to link /my\_product\_url/some\_parameter?

**URL:** <https://forum.shopware.com/t/how-to-change-link-my-product-url-p-some-parameter-to-link-my-product-url-some-parameter/91851>\
**Category:** Shopware 6 (English)\
**Created:** [7. Dezember 2021 um 15:37 UTC](https://forum.shopware.com/t/how-to-change-link-my-product-url-p-some-parameter-to-link-my-product-url-some-parameter/91851 "2021-12-07T15:37:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yurii.k](https://avatars.discourse-cdn.com/v4/letter/y/90ced4/32.png) [@yurii.k](https://forum.shopware.com/u/yurii.k)\
**Post date:** [7. Dezember 2021 um 15:37 UTC](https://forum.shopware.com/t/how-to-change-link-my-product-url-p-some-parameter-to-link-my-product-url-some-parameter/91851/1 "2021-12-07T15:37:18Z")

</div>

Hi, friends!  
I use for displaying product some parameter which I get now via GET in url - like this:

> /my\_product\_url?p=some\_parameter

How can I get this parameter on product page via url, like this:

> /my\_product\_url/some\_string

?  
Thanks a lot!

---

<div class="post-metadata">

**Author:** ![yurii.k](https://avatars.discourse-cdn.com/v4/letter/y/90ced4/32.png) [@yurii.k](https://forum.shopware.com/u/yurii.k)\
**Post date:** [8. Dezember 2021 um 08:06 UTC](https://forum.shopware.com/t/how-to-change-link-my-product-url-p-some-parameter-to-link-my-product-url-some-parameter/91851/2 "2021-12-08T08:06:46Z")

</div>

Yep, I found solution for this. It is very simple. In my custom router I need to get my productId (for example, from repository via known URL) and then make forward to frontend.detail.page route with this productId as parameter:

> `return $this->forwardToRoute("frontend.detail.page", [], ["productId" => $productId]);`

Maybe, it is not ideal solution, but it works for me)

But if someone has more correct solution - I’ll be glad to know it 😉
