This repository has been archived by the owner on Nov 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Redirects
Kyle Kirkby edited this page Jun 27, 2019
·
2 revisions
Note: This section is only applicable to static sites deployed within Linaro. You can however use the same approach for your site using the following method.
We are using Edge-rewrite which is a rewrite engine running in Lambda@Edge. The redirects are to be added to the _data/routingrules.json
file in the webiste repository following the syntax rules here.
^/oldpath/(\\d*)/(.*)$ /newpath/$2/$1 [L]
!^/oldpath.*$ http://www.example.com [R=302,L,NC]
^/topsecret.*$ [F,L]
^/deadlink.*$ [G]
^/foo$ /bar [H=^baz\.com$]
Note: These redirects are currently not respected by the link checker until built. So if trying to fix broken links by adding redirects then this may not be the best way to go about it currently.
Jumbo Jekyll Theme | Developed by Kyle Kirkby for Linaro's Static Websites