Using custom field to redirect. (2 posts)

  1. hummelmose
    Posted 2 years ago #

    Hi there.

    I'm currently running a asp.net site, and I'm ready to convert it to WordPress. But I want to maintain my current SEO ranking, so I need to make my site answer on old url as well.

    The old url is:


    I have made PHP answer on aspx extensions, but can anyone help me making a php side that takes the articleid, query it on a custom field in wordpress, and then make a 301 redirect to the new wordpress url.

    I'm not worldchamp in PHP, since I come from the .net world, but I'm willing to learn :-)

  2. Rod Whiteley
    Posted 2 years ago #

    My first thought would be to use the template_redirect action to detect that kind of URL and take appropriate action, because I'm familiar with it. It doesn't have to provide a WordPress template. It can do something else entirely and exit.

    There might be a clever solution using WP_Rewrite, but I've never tried that.

Topic Closed

This topic has been closed to new replies.

About this Topic