Get $_GET parameters from rewrite URLs

Greetings.

I defined “rewrite url” as /page/:param1/:param2
and called it dynamically (/page/1/2) in tag.

but in the the called page, I cannot get the params.
I defined the query params (param1, param2) in the APP define parameters.

How can I get the get parameters and use it in app frontend to call another apis.
Thank you for your effort.

Have you reviewed this doc on how to do this: https://docs.wappler.io/t/url-rewriting-with-wappler/6254

Hi, mgaussie
Thank you for your reply.

Yes, I done like that.
and I defined the params as this link.


But cannot get the request params.

defined the praams in the Query.
but {{query.param1}} is empty.

The reason was why there is a problem in Rewrite URLs in Node.js mode.

I use this heavily in my node project, and it is currently working - can you share some screenshots of your implementation both on app connect, routing and server connect and I can see if I can help identify the problem?

Great, okay. I will share, one second.

if click then it goes to /tour/no/s/t/p (it’s good)

The last two images are the same - is that meant to be the case?

Can you describe what is not happening?

Are you saying that the destination page is not correctly displaying the data from the url path as desired? Are you getting data from the database via a Server Connect?

yes.
sorry.
if click then it goes to /tour/no/s/t/p (it’s good)

It’s a little difficult without full screenshots to know what’s going on, and what you are binding.

You would typically pass the url parameters via a $GET to then run the a DB Query to get an output, e.g. like ‘CardDescription’ - this would then render in the browser.

It looks like you are binding the query parameter from the query manager - is this not working when you render in a browser, or with dynamic data turned on?

Without knowing your use case:

I have url parameters setup like you do in routing, I then setup the parameters in the query manager. In the server connect file, I add these as $GET then I click on the server connect in the AC and add the Query Parameters in there from the URL.

With that data, I then run queries on the server side, and bind that data to the page.

It’s worth noting - I had lots of issues with a similar url parameter structure - but I don’t know if it would be the same for you.

E.g. /:lang/:type is seen merely as :param1/:param2 by Wappler, so if you swap around :lang and :type, it makes no difference.

You can paste your screenshots directly in the post, no need for 3rd party.