Suppose you have a Figma file that serves as your online portfolio. It looks something like this:
Gross. No one wants to open that.
No matter, because you are a web master and happen to run your own website on Eleventy and host it on Netlify. You can use redirects to share a portfolio URL like
yourname.com/work that then redirects to the Figma link.
Create a file called
_redirects in the
src of your Eleventy project.
You read that right: without a file extension. Then fill that file with redirects in the following syntax:
For your Figma use-case that might look like:
That’s it. Now we just need to turn it on.
Eleventy ignores files and folders by default.
You need to tell it to pass through the
_redirects file by leaving instructions in the
.eleventy.js file like so:
Here are some more thorough resources that helped me: