Redirect Index Page if there is a path that does not exist

Hi,

I am trying to set up so that if you go to my index page for example.

yourapp.com

You will land in the home page. However, say if you go to
yourapp.com/hellworld , this hello world page does not exist in bubble io as a new page. however, yourapp.com/hellworld will redirect you to
yourapp.com/existingpage/helloworld
where existingpage is an actual bubble page.

any ideas how to do this? i have it set up that if you go to index page and it contains a path, redirect to existingpage. however, in reality what is happening is i get a 404 error instead.

You can set a condition on your 404 page to redirect to your index page

2 Likes

Thank you Zeroic, now is there a way to not even have it load 404? I see it load up quickly and then redirect. I would love for it to not even load 404.

Where have you put the redirection action?

the flow starts when i first enter yourapp.com/helloworld (a non-existing page)

  1. my 404 page is loaded immediately
  2. it then properly routes to yourapp.com/existingpage/helloworld but i briefly see the 404 page.

Also, i notice when i an routed to 404 page, it does not seem get the data path from page url. it will not display anything and be blank.

Hi, you need to hide the parent group in your 404 page and on page load workflow add a goto page navigation redirecting to index page.

2 Likes

got it, so just hide the 404 screen and make it blank so it appears that it didnt load a 404 screen

1 Like

@cyril.legaspi so now that I am using 404 page and redirecting. When not a 404 page, when the links are texted, they have a preview message.

How do i make it so yourapp.com/hellworld has a preview image when i text. I can set a preview image to the 404 page but yourapp.com/hellworld does not get this preview image. If i specifically text yourapp.com/404 I will get the 404 preview image.

This topic was automatically closed after 70 days. New replies are no longer allowed.