This recipe is a good example of the possibility of creating exceptions with redirection.io. Specifically, it shows how to define an exception to an HTTP redirection rule.

This recipe creates two rules:

  • a redirection rule from www.example.com to example.com
  • an exception rule, which disables the previous rule for a configurable path.

Once the recipe is installed, you can obviously modify the rules it has created.

Use case example

  • Preserving a subdirectory: Consider a website where a subdirectory contains a legacy application that is not compatible with the HTTPS protocol. The "Redirect Except a Path" recipe allows you to redirect all requests to HTTPS, except for those targeting the legacy application's subfolder. This ensures that the old application remains accessible to users, while the rest of the website is secured with HTTPS.
  • Protecting administration folders: Paths to an admin area that are essential for website management can be exempted from the application of certain rules, in order to guarantee uninterrupted access for site administrators.

How to install this recipe on my website with redirection.io?

Installing this recipe on your website requires the following steps:

  1. Enter the path to ignore: In the form, specify the path that should ignore redirection.
  2. Click on the "Install on my website" button: Install the recipe - this will create two rules in "draft" mode.
  3. Modify the created rules: Review the created rules to ensure they meet your expectations. You can modify them before publishing, for example, to replace the example.com domain with your own domain.
  4. Publish the rules: A few seconds after publication, the redirection and its exception will be active.

Discover our recipes to improve your website's quality in one click

redirection.io's recipes are a powerful feature designed to simplify the implementation of front-end quality best practices for your websites. Think of them as a curated "app store" for your site, offering a variety of pre-configured solutions that can be installed with a single click.

Discover all redirection.io recipes