I have an old site on
archive.mysite.com and new site on
mysite.com. Archive has some old custom CMS and it will take some time to transfer old articles to new site, so for the time being I'd like to do the following :
- User types in some URL e.g.
- If URL doesn't exists I don't throw
404immediately but first check if I can fetch content from
mysite.com/someRandomURLin the background.
- If I can, than I serve that raw HTML that I've fetched from my archive (and I don't want wordpress sending 404 status in response header)
- If I can't than I finally throw 404 and let wordpress show 404 page.
I know this is hacky solution but I'm doing it with a reason so please don't comment on that.
Essentially, what I want to do is say "Let me check if this content 'really' doesn't exist, or if I maybe have it in my archive."