You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observe how this vanity url - https://hydrogen.packdigital.com/about - with only one path segment, does not redirect to "/pages/about-us" as set in URL redirects within the Online Store Shopify app
Observe how this vanity url - https://hydrogen.packdigital.com/pages/1 - with at least 2 path segments, does redirect to "/pages/privacy" as set in URL redirects within the Online Store Shopify app
Expected Behavior
The catch all route $.tsx placed in /routes should catch invalid url's with only one path segment, e.g. /xyz and redirect to the 404 page
Redirect from url's with only one path segment, e.g. /about should redirect to the url set in URL redirects in Shopify, e.g. /pages/about-us
export async function loader() {
throw new Response(null, {status: 404});
}
export default function Route404() {
return null;
}
Actual Behavior
All invalid or vanity url's with only one path segment redirect to the home page no matter what. For invalid url's, the loader from $.tsx is never reached, thus no redirect to the 404 page.
The text was updated successfully, but these errors were encountered:
jeremyagabriel
changed the title
Invalid URL's with a single path segment do not redirect to 404 or to a redirect set in Shopify, rather to the home page
Invalid or vanity URL's with a single path segment do not redirect to 404 or to a redirect set in Shopify
Jun 21, 2024
What is the location of your example repository?
No response
Which package or tool is having this issue?
Hydrogen
What version of that package or tool are you using?
2024.4.2
What version of Remix are you using?
2.9.2
Steps to Reproduce
Expected Behavior
$.tsx
placed in/routes
should catch invalid url's with only one path segment, e.g./xyz
and redirect to the 404 page/about
should redirect to the url set in URL redirects in Shopify, e.g./pages/about-us
Actual Behavior
All invalid or vanity url's with only one path segment redirect to the home page no matter what. For invalid url's, the loader from
$.tsx
is never reached, thus no redirect to the 404 page.The text was updated successfully, but these errors were encountered: