I found a solution i just add a condition in app.tsx
const basePath = '/app'; // sub floder
// Intercept all Inertia requests to enforce the correct prefix
router.on('start', ({ detail: { visit } }) => {
const path = visit.url.pathname;
//add prefix if needed
if (path.startsWith('/') && !path.startsWith(basePath)) {
visit.url.pathname = basePath + path;
}
});