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
toexample.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:
- Enter the path to ignore: In the form, specify the path that should ignore redirection.
- Click on the "Install on my website" button: Install the recipe - this will create two rules in "draft" mode.
- 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. - Publish the rules: A few seconds after publication, the redirection and its exception will be active.