This repository contains a script and configuration for setting up redirects for a website. It uses a simple Bash script to automatically create redirect pages in the dist
directory based on the _REDIRECTS
file.
redirects_script.sh
: The Bash script that reads the_REDIRECTS
file and creates redirect HTML files in thedist
directory._REDIRECTS
: A file listing the paths and their corresponding redirect URLs.
-
Place the
_REDIRECTS
File: Ensure the_REDIRECTS
file is in the root of your repository. This file should list the paths to redirect from and the corresponding URLs to redirect to, one pair per line. -
Add the Script: Place the
redirects_script.sh
in your repository, preferably in a scripts directory.
- Update the
_REDIRECTS
file as needed with new redirect pairs. - Run the
redirects_script.sh
script to generate the redirect pages in thedist
directory.
- Ensure the
redirects_script.sh
is executable (chmod +x redirects_script.sh
).