Dynamic routing of a large page

Hi!

I’m thinking about relaunching our homepage (currently Wordpress) with Wappler (in Php, Mysql).

The only question I have is the routing.

I need this link structure:
https://www.page.de/cat1/cat2/permalink

Page structure: (example)
original structure: https://www.page.de/?page=1234
permalink: curling
cat1: christmas
cat2: bochum

it must look like this: https://www.page.de/christmas/bochum/curling

Is it possible to dynamically generate the routing from the page variables?
We currently have 600+ pages and editing them manually is too time-consuming.

Thank you for your help

Have a look at

Having said that, have you had a look at using NodeJS as the server model? I think that you will be pleasantly surprised.

I don’t think that’s possible on my server…

supplement
I just saw that my provider also offers NodeJS.
I’ll check that out

Routing doesn’t require NodeJS, you can do this with any server model. Just follow the docs Ben linked to.

I am assuming that you are referring to NodeJS. It is not my intention to forcably move you from using PHP, I just thought to draw your attention to an alternative before setting off on the journey. Mainly because routing is an integral part of NodeJS.

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