Redirect links after changing to directory


#1

Just wanted to make sure I understand the redirects docs correctly…

So, I’ll be moving my blog from subdomain to subdirectory. Since I have some external links pointing to my current url (the one with subdomain), I was wondering if the below format is correct?

{
   "from": "https://blog.domain.com/post-1" ,
   "to":  "https://domain.com/blog/post-1",
   "permanent": true
   },
   {
   "from": "https://blog.domain.com/post-2" ,
   "to":  "https://domain.com/blog/post-2",
   "permanent": true
   },
   {
   "from": "https://blog.domain.com/post-3" ,
   "to":  "https://domain.com/blog/post-3",
   "permanent": true
   }

#2

The redirects.json file is used only for path-based (i.e. “local”) redirects - e.g. /slug-with-typo -> /real-slug

If you’re moving from a subdomain to subdirectory the subdomain needs to have redirects configured separately. Ghost doesn’t have any involvement in that


#3

Aah, that was my fear. Thanks @vikaspotluri123


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.