标签:always star tps baseline ide res can like auto
In addition to creating routes, you can also create redirects for any time there are any changes in your URLs and you need to forward visitors
The redirects.json
file is located in content/data/redirects.json
and - like routes.yaml
- can also be downloaded/uploaded in the settings in Ghost Admin.
This file always starts with a [
and ends with a ]
. A new ghost publication will have an empty redirect file containing []
. It can be edited in any source code editor.
{
"from": "/url/" ,
"to": "/url/",
"permanent": true | false
}
Multiple entries are separated by ,
and the last entry does not have the ,
. Regular expressions can be used to implement redirect patterns.
Upload your new redirects.json
file in Ghost admin in the settings. This is the recommended method.
To replace the JSON file on the server, ensure it exists in content/data/redirects.json
and run ghost restart for your changes to take effect.
redirects.json
There are some instances where it is not recommended to use the redirects.json
file:
routes.yaml
file. (However, you may still need to redirect existing content using redirects.json
).标签:always star tps baseline ide res can like auto
原文地址:https://www.cnblogs.com/QDuck/p/12081561.html