I've recently tried to put an Inertia app with Vue 3 and Laravel 8 on my personal server (shared hosting with Hostinger). The assets are built live, and the contents of the public/ folder are moved to a subfolder in public_html, like so:
/ root_of_server
| - project_core (everything except public/)
| - domains
| - mydomainname.com
| - public_html
| - project (the public folder)
Here's what my routes/web.php looks like:
Route::get('/', function () {
return Inertia::render('Home');
});
Route::get('/github', function() {
return Inertia::render('Github');
});
However, the URL in the browser is rewritten whenever I access a page.
https://www.mydomainname.com/project turns into https://www.mydomainname.com/project/project
The same thing happens with the other route.
https://www.mydomainname.com/project/github turns into https://www.mydomainname.com/project/project/github
Checking with vue devtools, Inertia.initialPage.url seems to be set to the incorrect value (the one with a duplicate)
Would anyone know how to solve this? I can't find anyone with the same issue. Here's the github link to the project: https://github.com/samuelkirbyaguilar/mimic/tree/github