Is it possible for somebody to access the correct page from a url such as www.mybackendlessapp.com/blog/mylatestblog

Hi

I have an app using UI builder. One key thing is two fold:

The main reason is the app is a bit of a discovery app and I want to be able to share the easily read url rather than www.mybackendlessapp.com/?page=blog&data=mylatestblog

I imagine the user would request www.mybackendlessapp.com/blog/mylatestblog in their browser, the app would then receive it in the api and then serve the regular www.mybackendlessapp.com/?page=blog&data=mylatestblog. But I’m not sure this is possible ?

And if the nice user readable version of the url can mask the regular url in the browser, even better.

Any thoughts please?

Thanks
Paul

For example, a Ruby on Rails app would use a router to recognise URLs and dispatch them to a controller’s action - in my case the correct resulting page. How does a backendless app with a UI builder FE achieve that?

Hello @paul-barnes

How do you get the url? PUBLISH or PREVIEW?

If I getting url by PUBLISH button, I get a link - https://copioususe.backendless.app/blog/index.html.

Regards,
Vladimir

Hi @Volodymyr_Ialovyi

On a published app to a custom domain, I get http://www.mybackendlessapp.com.
But yes I can also get to http://www.mybackendlessapp.com/index.html

If I preview I get something like https://api.backendless.com/xxxxxxxxxxxxxxx/xxxxxxxxxxxxxx/files/ui-builder/containers/default/index.html?page=blog&data=blogName

I don’t mind the ugly url on preview ( I think). Just when I finally get to production I want the clean easy read and easy to share url like http://www.mybackendlessapp.com/blog/blogPost.

Like I said, it’s the sharing of the clean url and then being able to process the clean url when received by the app. If the app can’t maintain the clean version once loaded, that’s okay but not preferred.

Does that make sense ?

Thanks
Paul

HI

Maybe a better question to ask is : What is the life cycle of a request to a backendless app ?

  • How does the app receive a request?
  • Can I read that request and interpret the URL (that the user put in the browser or clicked a link from) to then process and redirect to open the appropriate page ?
  • Can this be done before the app decides it’s a 404 ?

As I said, if a user clicks on a link in an email such as https://www/backendlessapp.com/blog/blogpage, I want to direct the user to that page that would probably be on something like https://www/backendlessapp.com?page=blog&data=blogpage. If that ugly url can be masked, even better.

Thanks
Paul

hello @paul-barnes

Sorry, but unfortunately there is no way to change the url.

there is a workaround. You can create a redirect html file:

<html>
  <head>
    <meta http-equiv="refresh" content="0; URL=https://www/backendlessapp.com?page=blog&data=blogpage" />
  </head>
</html>

so when you call https://.backendless.app/my/redirect/test
you will be redirected

Thanks Sergey. I will test that idea. thank you. So for every url, I would need a redirect html file ?

Is there something architectural that would stop this in the current platform ? As my desired format for a url isn’t uncommon.