Skip to content

Instantly share code, notes, and snippets.

@konstantinmuenster
Created December 22, 2019 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konstantinmuenster/fb81c9026b9c4fbac17cbe010f88545f to your computer and use it in GitHub Desktop.
Save konstantinmuenster/fb81c9026b9c4fbac17cbe010f88545f to your computer and use it in GitHub Desktop.
Example createRedirect for Netlify redirects
exports.createPages = ({ actions }) => {
const { createRedirect } = actions;
createRedirect({
fromPath: "https://yoursubdomain.netlify.com/*",
toPath: "https://www.yourcustomdomain.com/:splat",
isPermanent: true,
force: true
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment