• Is there a way to use Redirection so that if someone goes to any non-existent page on my website, they’re automatically redirected to a single page that I’ve designated for that purpose?

    I’ve been using “404 to 301” to do that, and it works very well…except that it now is causing conflicts with Optimize Press, which I use heavily and don’t want to stop using.

    BTW, I’m 99% non-technical. So if there’s a solution, it’d be great to have it explained so simply that even I can understand it.

    Thanks in advance for any assistance anyone may be able to give.

Viewing 3 replies - 1 through 3 (of 3 total)
  • See this other response that I just posted.

    Since I believe this plugin only redirects pages that are going to go to 404 anyway, it might be safe to use “.*” to redirect everything to the same target.

    The other way to do this would be to just create/edit the 404 template in your theme so that it displays what you want. I just did that, and added some data into the page with some custom code so that it shows enough info to be useful but not too much to be a security issue. I also trap the 404s there and save some extra data into a log for later review.

    HTH

    Thread Starter danoday2

    (@danoday2)

    Thanks for the suggestions.

    I’m afraid I don’t know what you mean by “use “.*” to redirect everything to the same target.”

    Are you suggesting using “.*” as the Source URL and the URL of the page I want all of my 404s to redirect to as the Target URL?

    And if so, somehow “.*” won’t interfere with all of my other, “real” redirects?

    Thanks,
    Dan O’

    That “.*” would have to be the last redirect that’s processed. See other threads about ordering/priority of redirects.

    So after going through all of your other “real” redirects, if none of the others apply to a specific request, then this last one “.*” says “if there are zero or more occurrences of any character, go to this URL”. That’s the universal redirect that you’re requesting.

    Any better?

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

The topic ‘Create a “Universal” Redirect?’ is closed to new replies.