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

Update documentation to address situation where wildcard source path is accompanied by other source paths #9

Open
eecavanna opened this issue Jul 12, 2024 · 1 comment

Comments

@eecavanna
Copy link

Thanks for building this plugin!

Today, I tried implementing two redirects on a site. One of the source paths had a wildcard in it, and the other one did not. Here's a representative example:

redirects = {
   "path/to/foo" = "https://www.example.com/foo",
   "path/to/*" = "https://www.example.com/other"
}

I had expected the outcome to be:

  • If someone visits path/to/foo.html, they would be redirected to https://www.example.com/foo
  • If someone visits path/to/bar.html, they would be redirected to https://www.example.com/other

What I observed was:

  • If someone visits path/to/foo.html, they are redirected to https://www.example.com/other
  • If someone visits path/to/bar.html, they are redirected to https://www.example.com/other

In other words, the source path containing the wildcard seemed to me to take priority.

I'm opening this Issue to request that the behavior be addressed in the plugin's documentation. Currently, in all the examples where a source path includes a wildcard, there is only one redirect in that example.

@eecavanna
Copy link
Author

Currently, in all the examples where a source path includes a wildcard, there is only one redirect in that example.

This is true about all examples, regardless of whether a source path includes a wildcard. All examples have only one redirect defined in the redirects dictionary.

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

1 participant