301 & 302 Redirects

Evance automates a number of redirect rules, particularly 301 redirects. 

Whenever you change the URI of a web page, category or product, its original URI is saved for historical reference. This allows Evance to 301 redirect users to the latest URI when visiting an old URL for a page. 

Similarly, Evance can maintain a list of domain names for your website. Users visiting your website on a domain that is not your preferred domain will be 301 redirected to your preferred domain.

Evance also automates SSL renewals and enforces HTTPS everywhere when an SSL certificate is available. If a user visits on an HTTP connection they will be 301 redirected to an HTTPS connection.

Adding historical URLs manually

The addition and management of 301 redirects is available for you to control from within Evance.

  • Add 301 redirects in bulk in Settings
  • Import 301 redirects in bulk via CSV
  • Add 301 redirects for a Page, Category or Product
  • Add 301 redirects to files in your Media Library, or even to external websites

Diagnosing redirect reasons

Sometimes it's difficult to know why a 301 or 302 redirect is occurring on your website. Especially as your website grows and gets more complicated. To help diagnose unexpected redirects, Evance includes a X-Redirect-Rule header with most redirects. You can use your Browser's developer tools or an application like Postman to request your web page's URL. 

When using developer tools in a Browser like Google Chrome, you will need to persist request information in order to see redirect reason headers.

X-Redirect-Rule reasons

category/locale-alternative 302
The Category has a Locale Restriction which is blocking access to the Category on the current Locale. However, the website's administrator has provided an alternative URI in the Category's Locale Restriction settings.
category/uri-mismatch 301
The category was identified but the URI match may have been performed on a historical Category URI. When Evance encounters a URI match on a historical Category Alias it issues a 301 redirect to the Category's current/new URI.
controller/domain 302

Redirection due to a domain issue. Additional information is usually supplied within the X-Redirect-Reason. These include:

  • "edit mode requires an account domain" - your session is currently in edit mode, which requires an evance.me domain.
  • "https connection required" - Evance now requires an HTTPS connection.
  • "domain locale requirements" - when a domain is mapped to a locale e.g. mydomain.fr maps to mydomain.com/fr-fr.
controller/https-required 302
The request came from a non-secure connection.
checkout/setting-user-required 302
The website administrator has turned on authenticated checkouts only, which requires visitors to create an account or log into an existing account before they’re able to checkout.
checkout/subscription-user-required 302
The cart contains one or more subscriptions. Subscriptions require a user account regardless of any other settings.
controller/user-required 302
The location requires user access. A user is not authenticated in the current session, nor recognised from a persistent session ("remember me").
controller/access-authenticate 302
The location requires the user to be authenticated in the current session and does not permit users recognised from a persistent session (returning users who selected "remember me" functionality).
controller/access-expired 302
The request requires an access role the user has, but has expired.
controller/access-pending 302
The user’s access role required to visit the page is pending approval.
controller/access-validate 302
The user has been sent an email validation request, but has yet to use the verification link.
controller/access-rejected 302
The user’s request for access required to visit the page has been declined.
controller/access-denied 302
The user does not have sufficient permissions to access the page.
page/uri-mismatch 301
The page was identified but the URI match may have been performed on a historical URI for the Page. When Evance encounters a URI match on a historical Page Alias it issues a 301 redirect to the Page's current/new URI.
page/locale-alternative 302
The Page has a Locale Restriction which is blocking access to the Page on the current Locale. However, the website's administrator has provided an alternative URI in the Page's Locale Restriction settings.
page/access-authenticate 302
The page has permissions (from its own Page Permissions or from an ancestor) and the current user is not authenticated or recognised. Recognised users include those who authenticated in a previous session using "Remember me" functionality.
page/access-expired 302
The current user has does not have any active access roles required by the Page permissions, except one or more that have expired.
page/access-pending-role 302
The current user has one or more access roles pending approval, which is required by the Page's permissions. The page URI the user is redirected to was determined by one of the required access roles (admin pending URI setting).
page/access-pending-portal 302
This is the same as page/access-pending-role except the URI the user is redirect to was determined by the default rules for the Portal.
page/access-validate-role 302
The user is required to validate their account. The URI the user is redirected to was determined by one of the required access roles.
page/access-validate-portal 302
The user is required to validate their account. The URI the user is redirected to was determined by the default rule for the Portal.
page/access-rejected-role 302
The user's access role request has been rejected. The URI the user is redirected to was determined by one of the required access roles.
page/access-rejected-portal 302
The user's access role request has been rejected. The URI the user is redirected to was determined by the default rule for the Portal.
page/access-denied-document 302
The user does not have any of the Page's required access roles, the page denied URI is supplied by the page itself.
page/access-denied-role 302
The user does not have any of the Page's required access roles, the page denied URI is supplied by one of the Page's access roles.
page/access-denied-portal 302
The user does not have any of the Page's required access roles, the page denied URI is supplied by the default rule for the Portal.
product/uri-mismatch 301
The product was identified but the URI match may have been performed on a historical Product Alias. When Evance encounters a URI match on a historical Product Alias it issues a 301 redirect to the Product's current/new URI.
product/locale-alternative 301
The Product has a Locale Restriction which is blocking access to the Product. However, the website's administrator has provided an alternative URI in the Product's Locale Restriction settings.
redirects/url 301
A redirection based on a Redirect rule, typically to a static file, or external website.