WordPress.org

Ready to get started?Download WordPress

Forums

Redirection
Redirect fall back to archived site (1 post)

  1. syrupcore
    Member
    Posted 3 months ago #

    We just rebuilt a 10+ year old static site which had *lots* of static content on WordPress. About 60% of that content didn't make it, yet. We prioritized moving and 301ing anything with more than N referred hits over the past 6 months and we've 307'd the parts of the site with low traffic to a sub domain that has the all of the old content intact (archive.mysite.com/blah). Decided to 307 because we sill want http://www.mysite.com/blah to be the known/canonical url and don’t want to follow our tails with having to add 301s to the archive domain every time we get a piece of content moved over to the new site.

    Anyway. I was trying to think of a way to redirect to the archive site if:
    1) there is no existing redirect
    and
    2) it 404s on the new site
    and
    3) if it even exists on the archive site

    The third one is the key. If someone lands on mysite.com/this/never/existed I don't want to automatically dump them to the archive site.

    I was thinking I might add some php or js code to my 404 template and ping the archive site with the bit from the original request. If it doesn't 404, redirect them there.

    Is this an awful idea? Is there a better way?

    https://wordpress.org/plugins/redirection/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.