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

What's up with CloudFlare _redirects and URLs with and without trailing slashes? #82

Draft
wants to merge 1 commit into
base: 2020
Choose a base branch
from

Conversation

renoirb
Copy link
Owner

@renoirb renoirb commented Oct 30, 2024

Gotta make sure we click on a link that's without that it handles it right, including with it too.

Reason For This Issue

Vue/Nuxt doesn't hit CloudFlare in the same way when changing routes as when we're loading the first time.

The first time, the file at the path is finding the index file in the folder (i.e. a full HTTP cycle, with HTML, JS, paint, etc)

The second, as Nuxt/Vue does (because of its build process output) only loads JS code to update the current view and push to browser history. Not a full HTTP cycle in the same way.

That's why redirects in _redirects aren't taken into account after the first load and navigating.

@renoirb
Copy link
Owner Author

renoirb commented Nov 3, 2024

OK. I found the reason for the issue.

It might not be as important in relation to the other objectives.

If we keep Nuxt as-is for near future

If we keep Nuxt and Nuxt-Content as they are, at an higher version.

In that case, we'll have to have the same redirect map as CloudFlare, taken into account also by Nuxt (VueRoutef).

So we'd need what's in #65 at the redirect part.

If we upgrade Vue/Nuxt or use Astro

If we consider that priority was migrating everything as it was back in 2020 and have the old WordPress out of the equation.

Maybe it would be better now to upgrade the versions of Nuxt and Vue. And maybe simplify and separate some more. Like using Vite and Astro alongside with WebComponents and Vue.

This might be just adding work that'll be done for nothing.

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

Successfully merging this pull request may close these issues.

1 participant