Redirection with function

Hello,

I’m building a site where the projects are on AJAX on the homepage and where the URL change dynamically with the real URL of the projects.

However, obviously when you refresh the page or when you goes on the dedicated URL, this opens the project with the project template. So I thought of adding a redirect function with some commands inside like
-> Goes to homepage
-> AJAX the project
-> Change dynamically the URL with the real URL…

Is it a correct trick ? And how should I do that ? I thought of using a hidden input with POST…
Is there a Kirby trick ?

Thanks again the community :slight_smile:

Valentin

Please don’t duplicate posts, I will now delete your original post.

You could use a route to redirect those projects to the homepage. But what about users with disabled JavaScript? Do you want to lock them out of that website content?