Managing URL redirects via Pack's Admin

If you have any old URLs you want to point to your new site, please follow the steps below to add a new redirect:

  1. Navigate to Pack’s admin.
  2. Click on Settings > URL.
  3. Click on Create redirect.
  4. Input the URL you want to redirect from and the URL you want to redirect to, and choose the status code to use. Check 'force' to force the redirect to occur even if the source route exists.
  5. Click on Create redirect.
  6. Allow up to 5 minutes for the redirect to take effect.

Managing URL redirects via Shopify’s Admin

If you don’t want to automatically redirect a URL to your Pack site, you can do so by following the steps below:

  1. Navigate to Shopify’s admin > Online Store > Themes > Three dots > Edit code.
  2. Click on theme.liquid.
  3. Insert the following snippet:
<script>
  const base = 'https://packdigital.com'; // your storefront URL, e.g. https://packdigital.com
  const path = window.location.pathname;
  const params = window.location.search;
  const hash = window.location.hash;
  const to = `${base}${path}${params}${hash}`;
  // Add any paths you do NOT want to redirect to here
  const viewablePaths = ['/apps/', '/tools/', '/account'];
  const appProxyPaths = viewablePaths;
  const isNotAppProxyUrl = appProxyPaths.every(proxyPath => !path.startsWith(proxyPath));
  if(isNotAppProxyUrl){
    window.parent.location.href = to;
  }
</script>
  1. Click on 'Save'.
  2. Allow up to 5 minutes for the redirect to take effect.

Was this page helpful?