Social Username Routing

Hi,

I have been looking at the Wappler docs routing section. Say my database has many users with unique usernames. Then I want them to have their own unique public profile to be shared socially.

Is it possible to do clean URL username routing in Wappler?

Like this:

twitter.com/wapplerio
youtube.com/wapplerio
medium.com/wappler-io

Hi @stone
Yes, it’s possible to rewrite any URL with Wappler:

Hi @Teodor,

To be clear I’m looking for something like this domain.com/username and not domain.com/page/username

What part are you referring to? Is it under Dynamic Links > Simple Routing Links ?

I’m not really sure because it seems too simple. How does it know what pages to not route on? Like don’t route on /dashboard but a username like /dashbo is fine.

Dynamic links. It truly is very simple.

I can not find how to do this.

In the docs, It says we can make dynamic URL parameters like this:
example.com/airport/:parameter

But it says nothing about doing it without including a static page in the URL, like this:
example.com/:parameter

I’m guessing it’s not possible to do it? At least by default in Wappler.

This is very possible to do, I am personally doing exactly that on my site.
My site has 4 depth levels including the very very root

Depth level 1: example.com
Depth level 2: example.com/pages/
Depth level 3: example.com/pages/more/
Depth level 4: example.com/pages/more/even-more/

From depth level 2 - 4 I have multiple pages at each level, in other words on depth level 2 I probably have 70% of my websites total 500 odd pages.

My routing looks like this

I added that path and url into the route properties and it generated the code on the right, which basically translates to
"Look for the query parameter pageid" THEN
"Look for the query parameter pageid_b" WHICH may or may not be provided THEN
"Look for the query parameter pageid_c" WHICH may or may not be provided.

So my real website is actually only 1 page called index.php and then a bunch of Query parameters like
Depth 1

Depth 2

Depth 3

This site is not done as an SPA but rather just a database.

I hope this help a little.

3 Likes

Hi is it possible to use dynamic routing for node.js like the op is asking?

app.com/username