{"_id":"59365227e16643001bac5040","category":{"_id":"59365227e16643001bac5032","version":"59365226e16643001bac5030","project":"543026235eceb608003fde5f","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-06-05T10:03:36.502Z","from_sync":false,"order":1,"slug":"getting-started-from-supportghostorgdevelopers","title":"Self-Host Install & Setup"},"project":"543026235eceb608003fde5f","user":"55acc88c6b4ff90d00784b61","parentDoc":null,"version":{"_id":"59365226e16643001bac5030","project":"543026235eceb608003fde5f","__v":1,"createdAt":"2017-06-06T06:56:38.999Z","releaseDate":"2017-06-06T06:56:38.999Z","categories":["59365227e16643001bac5031","59365227e16643001bac5032","59365227e16643001bac5033","59365227e16643001bac5034"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0.0"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-05T15:24:37.229Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"You can define your own HTTP redirects for your Ghost blog. The redirects file is a JSON file and needs to be located in `content/data/redirects.json`.\n\nEach entry in the redirects file has the following structure:\n\n```\n{\n  \"from\": \"regex\" ,\n  \"to\":  \"/url\",\n  \"permanent\": true | false\n}\n```\n\nPermanent redirects (301) can be defined with `permanent: true`, otherwise we use 302 redirects as the default configuration.\n\nExample:\n\n```\n[\n    {\n        \"from\": \"^/post/[0-9]+/([a-z0-9\\\\-]+)\",\n        \"to\": \"/$1\"\n    },\n    {\n        \"permanent\": true,\n        \"from\": \"/my-old-blog-post/\",\n        \"to\": \"/revamped-url/\"\n    },\n    {\n        \"from\": \"^\\\\/what(\\\\/?)$\",\n        \"to\": \"/what-does-god-say\"\n    },\n    {\n        \"from\": \"^\\\\/search\\\\/label\\\\/([^\\\\%20]+)$\",\n        \"to\": \"/tag/$1\"\n    },\n    {\n        \"from\": \"^\\\\/topic\\\\/\",\n        \"to\": \"/\"\n    },\n    {\n        \"from\": \"^/resources\\\\/download(\\\\/?)$\",\n        \"to\": \"/shubal-stearns\"\n    },\n    {\n        \"from\": \"^\\\\/[0-9]{4}\\\\/[0-9]{2}\\\\/([a-z0-9\\\\-]+)(\\\\.html)?(\\\\/)?$\",\n        \"to\": \"/$1\"\n    },\n    {\n        \"from\": \"^/prefix/([a-z0-9\\\\-]+)?\",\n        \"to\": \"/blog/$1\"\n    }\n]\n```","excerpt":"","slug":"redirects","type":"basic","title":"Redirects"}
You can define your own HTTP redirects for your Ghost blog. The redirects file is a JSON file and needs to be located in `content/data/redirects.json`. Each entry in the redirects file has the following structure: ``` { "from": "regex" , "to": "/url", "permanent": true | false } ``` Permanent redirects (301) can be defined with `permanent: true`, otherwise we use 302 redirects as the default configuration. Example: ``` [ { "from": "^/post/[0-9]+/([a-z0-9\\-]+)", "to": "/$1" }, { "permanent": true, "from": "/my-old-blog-post/", "to": "/revamped-url/" }, { "from": "^\\/what(\\/?)$", "to": "/what-does-god-say" }, { "from": "^\\/search\\/label\\/([^\\%20]+)$", "to": "/tag/$1" }, { "from": "^\\/topic\\/", "to": "/" }, { "from": "^/resources\\/download(\\/?)$", "to": "/shubal-stearns" }, { "from": "^\\/[0-9]{4}\\/[0-9]{2}\\/([a-z0-9\\-]+)(\\.html)?(\\/)?$", "to": "/$1" }, { "from": "^/prefix/([a-z0-9\\-]+)?", "to": "/blog/$1" } ] ```