Dynamic routing of a large page

Thanks a lot for this,

before I start the new page, I will deal with the topic of NodeJS

Have a look at

ok, my provider also provides a NodeJS environment.

Well then let’s do it :wink:

I will watch and learn!

My server provider supports Nodejs.
Unfortunately I can’t get it to work.
So I have to stick with php/Mysql.
Unfortunately, I can’t get any further with the instructions.

my pages are structured like this:

$pageid
$permalink
$parent site
$pagecat (category, location, product)

$pagecat can be:
Landing page without parent page (e.g. excursions, team building… but also locations)
Example: www.mysite.de/teambuilding/
Example2: www.mysite.de/location/

or:
Landing page with parent page (e.g. excursions, team building in the respective locations
Example: www.mysite.de/teambuilding/location/

Product page with and without parent page
Example: www.mysite.de/product/
Example: www.mysite.de/teambuilding/product/
Example: www.mysite.de/teambuilding/location/produkt/

So I want the routing to consist of $permalink, $parent1 and $parent2.

How can I implement this?
Many thanks for your help!

Why do you think that this is not possible on your server?

my server can do Nodejs, I just can’t get it to work :unamused:

Christian, I am getting confused which is not difficult to do to this nearly octogenerian.

If I am right, you are wanting to switch from PHP to NodeJS. In that case, I assume that the remote sever facilitates NodeJS.

For the setup, have a look at

that’s exactly what I did (I think) but it doesn’t work.

I’ve wasted several days on this.
Since all my database applications work with php/Mysql, I would like to implement the new project with it.

I just can’t get along with the tutorials on routing.

For the routing to work for PHP, you need to have an Apache server running. In other words, if the server is IIS or NGINX then .htaccess is not avaliable.

For IIS you can use a reverse (NodeJS) proxy as per this dicussion

Apache, php, mysql and mod_rewrite are running on my server

What have you achieved and what are you missing?

Can you already obtain each param of the route?

Unfortunately not, I don’t understand anything here.
Especially how I get the $permalink of the respective page in the route.
Especially in concatenated links (example: www.mysite.de/cat1/location1/produkt1
)

What would be the permalink in that case? The combination of all slash-separated “categories”?

www.mysite.de/cat1/location1/produkt1

You’d need to make a route for each case: 1 param, 2 params, 3 params

The permalink is the combination of all these params, you can obtain so by concatenating in Wappler steps, or access a certain $_SERVER variable that might contain that already

Thanks for the information.
But how exactly do I do that?

“Advanced Rewriting with URL Parameters” on Teodor’s tutorial, start by attempting to grab the params

Also, I’m only familiar with NodeJS, so I don’t know if the process to do this is different on PHP

On NodeJS you can attach a server action to a page and there you can run the steps to concatenate the params into a permalink variable

Unfortunately I can’t get any Nodejs page online.

Christian,

  1. Have you set the server side of the project up as per

  1. Have you set a target as per

Then there should be no problem in following

You do not need NodeJS for this.