Removing the redirect from a theme page

Removing the theme page redirect

In deployed stores, theme pages are hosted in the checkout subdomain and will automatically redirect to the Nyla storefront. To prevent this, you can add exceptions in your theme code by following these steps:

  1. Access your theme code

    • Go to your Shopify Admin > Online Store > Themes.
    • In the "Current theme" section, click the three dots next to the "Customize" button and select Edit code.

      01


  2. Locate the redirect file

    • Use the search bar in the top-left corner to search for nyla-redirect.
    • Open the file nyla-redirect.liquid.

  3. Add exceptions for specific routes

    • Locate the following line in the code:
      const CUSTOM_PROTECTED_PATHS = [];
    • Add the routes you want to exclude from the redirect inside the square brackets, using quotation marks and separating them with commas and save your changes.
      • For example, to exclude /pages/tracking and /pages/referrals, the line should look like this:
        const CUSTOM_PROTECTED_PATHS = ['/pages/tracking', '/pages/referrals'];
         

02