Direct links for users?

The answer to this question – that you cannot have yoururl.com/arbitrary_alias without messing up essential 404 behavior – is most decidedly conclusive (as of this writing, 02/25/2019). While you can do it, the pages that you seem to direct to are throwing 404 errors back to the agent viewing the pages. So such pages will never be indexed properly.

However, you can have AWESOME /u/arbitrary_alias pages that DO NOT break Bubble’s built-in “send data” functionality, while still enabling a friendly social sharing URL, etc., with support for multibyte characters, etc. and pages that WILL get indexed in search engines (if you desire).

And, I built it for you: All you have to do is understand and copy what I did in the following example project.

SO, here is the sexiest and most correct way to do yoururl.com/your_choice_of_profile_page_names/arbitrary_alias, (again, as of this writing, 02/25/2019), examine the project called gibu (“gib username!”):

Run mode:
Live: https://gibu.bubbleapps.io
Dev: https://gibu.bubbleapps.io/version-test?debug_mode=true

Edit mode (anyone can view):

I’d recommend you visit live mode first, sign up and have the whole experience, then examine what’s happening in the editor and dev preview modes (extra debug type info is revealed in dev mode).

For a great deal of explication about how this is built, see my explanations in this thread:

(I realize that I did not respond to the very very last of comments in that thread… I’m sure someone following this example could come up with the answer to beau’s questions about back button behavior and I suspect beau probably figured out how to enable that to work in the way that they like.

While I will revisit this example on occasion if new features require changing how this should be done, you should realize that, personally, I don’t think any of this is particularly interesting or worth it. So I built this as an exercise and to serve as the “last word” on how this should be done. I’m not taking more questions on it, ATM.

But I realize that some people want to mimic such behavior in their apps, so I did my best to build the best emulation of this possible in Bubble. (That preserves all editor/dev mode/debug mode functionality, does not interfere with arbitrary URL parameters, etc., etc. There are a great many well-thought-out features here.)

The reason I say this is an emulation, is that the REAL way you would do this is with server URL rewrite rules. We do not have access to those in our Bubble web stack and so cannot do this in the exact fashion that, say, LinkedIn would do it. And if Bubble DID let us do that, many of those who want to incorporate such functionality would be all up here whining about how it’s too hard to write said server URL rewrite rules “because they are not coders.”

So, this example is about as easy as it gets. And it enables some fairly out there features that you just don’t see in most social networks. I mean c’mon, users on gib/u can have EMOJI USERNAMES! It’s pretty rad. Examining the project will teach you a bunch of cool tricks that you may not know yet. (There are “bonus beats” all over the place in there.)

Hope this helps,
Keith

5 Likes