Skip to content

Instantly share code, notes, and snippets.

@cagartner
Forked from LucasCalazans/routes.yaml
Created March 31, 2022 16:15
Show Gist options
  • Save cagartner/aa791e9714ff33921a2148dcf16290eb to your computer and use it in GitHub Desktop.
Save cagartner/aa791e9714ff33921a2148dcf16290eb to your computer and use it in GitHub Desktop.
Magento Cloud - Redirect customer pages to home
# The routes of the project.
#
# Each route describes how an incoming URL is going to be processed.
"http://{all}/":
type: upstream
upstream: "mymagento:http"
redirects:
paths:
"^/customer/account/forgotpassword/.*": { to: "http://{all}/", regexp: true }
"^/customer/account/login/.*": { to: "http://{all}/", regexp: true }
"^/customer/account/logoutSuccess/.*": { to: "http://{all}/", regexp: true }
"^/customer/account/create/.*": { to: "http://{all}/", regexp: true }
"^/customer/account/edit/.*": { to: "http://{all}/", regexp: true }
"^/customer/account/.*": { to: "http://{all}/", regexp: true }
"^/customer/address/new/.*": { to: "http://{all}/", regexp: true }
"^/customer_order/sku/.*": { to: "http://{all}/", regexp: true }
"^/sales/order/history/.*": { to: "http://{all}/", regexp: true }
"^/downloadable/customer/products/.*": { to: "http://{all}/", regexp: true }
"^/wishlist/.*": { to: "http://{all}/", regexp: true }
"^/storecredit/info/.*": { to: "http://{all}/", regexp: true }
"^/vault/cards/listaction/.*": { to: "http://{all}/", regexp: true }
"^/giftcard/customer/.*": { to: "http://{all}/", regexp: true }
"^/paypal/billing_agreement/.*": { to: "http://{all}/", regexp: true }
"^/reward/customer/info/.*": { to: "http://{all}/", regexp: true }
"^/giftregistry/.*": { to: "http://{all}/", regexp: true }
"^/review/customer/.*": { to: "http://{all}/", regexp: true }
"^/newsletter/manage/.*": { to: "http://{all}/", regexp: true }
"^/invitation/.*": { to: "http://{all}/", regexp: true }
https://{all}/:
type: upstream
upstream: "mymagento:https"
redirects:
paths:
"^/customer/account/forgotpassword/.*": { to: "https://{all}/", regexp: true }
"^/customer/account/login/.*": { to: "https://{all}/", regexp: true }
"^/customer/account/logoutSuccess/.*": { to: "https://{all}/", regexp: true }
"^/customer/account/create/.*": { to: "https://{all}/", regexp: true }
"^/customer/account/edit/.*": { to: "https://{all}/", regexp: true }
"^/customer/account/.*": { to: "https://{all}/", regexp: true }
"^/customer/address/new/.*": { to: "https://{all}/", regexp: true }
"^/customer_order/sku/.*": { to: "https://{all}/", regexp: true }
"^/sales/order/history/.*": { to: "https://{all}/", regexp: true }
"^/downloadable/customer/products/.*": { to: "https://{all}/", regexp: true }
"^/wishlist/.*": { to: "https://{all}/", regexp: true }
"^/storecredit/info/.*": { to: "https://{all}/", regexp: true }
"^/vault/cards/listaction/.*": { to: "https://{all}/", regexp: true }
"^/giftcard/customer/.*": { to: "https://{all}/", regexp: true }
"^/paypal/billing_agreement/.*": { to: "https://{all}/", regexp: true }
"^/reward/customer/info/.*": { to: "https://{all}/", regexp: true }
"^/giftregistry/.*": { to: "https://{all}/", regexp: true }
"^/review/customer/.*": { to: "https://{all}/", regexp: true }
"^/newsletter/manage/.*": { to: "https://{all}/", regexp: true }
"^/invitation/.*": { to: "https://{all}/", regexp: true }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment