Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

root directory is displayed twice in URL on load and reload #1569

Closed
imamura0825 opened this issue May 25, 2023 · 3 comments
Closed

root directory is displayed twice in URL on load and reload #1569

imamura0825 opened this issue May 25, 2023 · 3 comments

Comments

@imamura0825
Copy link

Version:

  • @inertiajs/vue3 version: 1.0.3

URL will be displayed twice.

The problem reported at this URL is happening to mine as well.

I am using Laravel+Inertia under a subdirectory.

When I access the following URL
http://example.com/my_project
The URL displays as follows
http://example.com/my_project/my_project/

The content is output correctly, but the URL is incorrect.
And reloading or loading will result in a 404 error.

There is a problem with the display part.

Steps to reproduce:

Place the project in a subfolder.
Access the original URL.
http://example.com/my_project
You will see the following
http://example.com/my_project/my_project

Reloading will result in a 404 error.

@imamura0825
Copy link
Author

These may occur when symbolic links are used.
I have a symlink from '~/example.com/my_project/' to /public in laravel.

This can happen when using symlinks.
I have a symlink from '~/example.com/my_project/' to /public in laravel.

This could result in both $request->getBaseUrl() and $request->getRequestUri() being 'my_project'.

vendor/inertiajs/src/Response.php

        $page = [
            'component' => $this->component,
            'props' => $props,
            'url' => $request->getBaseUrl().$request->getRequestUri(),
            'version' => $this->version,
        ];

@imamura0825
Copy link
Author

I'm sorry.
Wrong place to post.

@reinink
Copy link
Member

reinink commented Jul 28, 2023

Hey! Thanks so much for your interest in Inertia.js and for sharing this issue/suggestion.

In an attempt to get on top of the issues and pull requests on this project I am going through all the older issues and PRs and closing them, as there's a decent chance that they have since been resolved or are simply not relevant any longer. My hope is that with a "clean slate" me and the other project maintainers will be able to better keep on top of issues and PRs moving forward.

Of course there's a chance that this issue is still relevant, and if that's the case feel free to simply submit a new issue. The only thing I ask is that you please include a super minimal reproduction of the issue as a Git repo. This makes it much easier for us to reproduce things on our end and ultimately fix it.

Really not trying to be dismissive here, I just need to find a way to get this project back into a state that I am able to maintain it. Hope that makes sense! ❤️

@reinink reinink closed this as completed Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants