• em920

    (@em920)


    I’m trying to use redirection to help us manage our closed careers pages. Is it possible to set this up so it essentially says if (careers page) would return a 404/301 error, redirect to ‘Vacancy Closed’ page but if the original page is live, do not redirect?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter em920

    (@em920)

    Hi,

    Any advice on this problem?

    Thanks

    This is a built-in match in Redirection. You don’t need any external check.

    When adding the redirect:

    1. **Source URL**: pattern matching /careers/(.*) (toggle Regex if you want to catch sub-pages)

    2. **URL options** (click *More options* on the source URL row): change *When matched* from URL only to URL and HTTP status code

    3. **HTTP status code**: 404

    4. **Target URL**: your *Vacancy Closed* page

    Now the redirect fires only when the careers URL would otherwise 404. As long as the page exists and returns 200, nothing happens.

    A couple of gotchas: Some caching layers (Cloudflare, server-level page cache) keep serving a cached 404 long after the page comes back. If you re-add a vacancy and it still hits the redirect, clear those caches. A few themes return 200 OK on their custom 404 template (for SEO reasons). If yours does that, the match won’t fire, because the actual status code isn’t 404. Quick check: curl -I https://yoursite.com/careers/old-job should return HTTP/1.1 404.

    Does your careers page get rebuilt regularly, or is this more of a one-off cleanup? That changes whether you want the redirect to be permanent or scoped to specific URLs.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.