301 Redirect Custom URL hierarchy to WordPress Posts

One option is to Add URL Rewrite Rules.

Create an API Endpoint in WordPress is a good tutorial as well as The Rewrite API: The Basics.

Monkeyman Rewrite Analyzer is a great way to test what you created. Just be sure to flush your permalinks after each change.

This is also a good example which uses the endpoint to redirect elsewhere.

The biggest trick will be to get your ID for each post on the old site into a form which can be used on the new site.

Leave a Comment