Last active
March 31, 2022 16:15
-
-
Save LucasCalazans/0e14a8885c5084cc42a3439676f4e3cf to your computer and use it in GitHub Desktop.
Magento Cloud - Redirect customer pages to home
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 } |
I had to use the {all}
instead of {default}
because it will be used with multiples domains (Differents websites)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation about Magento Cloud Redirects
https://devdocs.magento.com/guides/v2.3/cloud/project/project-routes-more-redir.html