Skip to content

Improve redirect routing to not route unconfigured paths - #24

Merged
calirvine merged 1 commit into
vibe-redirect-themefrom
improve-redirect-routing
Jun 3, 2026
Merged

Improve redirect routing to not route unconfigured paths#24
calirvine merged 1 commit into
vibe-redirect-themefrom
improve-redirect-routing

Conversation

@calirvine

Copy link
Copy Markdown

Summary

This updates redirect URL construction so Shopify-specific paths are not carried over to the Hydrogen storefront by default.

Previously, the redirect URL was cloned from the current Shopify URL and only the hostname was replaced. That meant routes like /password were appended to the Hydrogen storefront URL, often causing a 404 when the Hydrogen app does not implement those Shopify-specific paths.

The redirect now starts from the configured storefront URL instead. Current request query params and configured storefront query params are still preserved, while custom redirect rules continue to rewrite matching source paths explicitly.

Details

  • Prevents Shopify-specific paths like /password from being appended to the Hydrogen redirect URL by default.
  • Preserves existing query parameter behavior from both the current request and storefront_hostname.
  • Keeps custom redirects working by matching rules against the original current pathname.
  • Allows configured storefront base paths to remain authoritative.

@calirvine
calirvine requested a review from denzelkwan June 3, 2026 02:30
@calirvine
calirvine merged commit 0d21bf3 into vibe-redirect-theme Jun 3, 2026
1 check passed
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.

2 participants