@rspress/plugin-client-redirects
Used for client redirects.
This plugin is always inactive in development and only active in production because it works on the build output.
Before using this plugin, make sure your deployment environment has the fallback page correctly configured. See the SSG refresh-404 guide for details.
If your deployment platform supports server-side redirects (301/302), prefer using that approach for better SEO and user experience.
Installation
Usage
Write the following configuration in the configuration file:
Configuration
This plugin supports passing in an object configuration. The properties of this object configuration are as follows:
from represents the matching path, to represents the path to be redirected, and using regular expression strings is supported.
One to supports matching multiple from: they will redirect to a single path.
One from cannot correspond to multiple to: there needs to be a unique and clear redirection path.