@rspress/plugin-client-redirects
Used for client redirects.
Precautions
To ensure that the plugin works correctly, you need to set the fallback path in the server's deployment configuration to the 404.html page generated by Rspress.
For example:
nginx
netlify.toml
Installation
Usage
Write the following configuration in the configuration file:
rspress.config.ts
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.
Note
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.