multiple url for single post in wordpress

I have a list of strings in in array.

$arr = ('Cab in Hollend', 'Cab in Chicago');

and put links in the wordprsss site like www.mysite.com/cab-in-chicago and www.mysite.com/cab-in-hollend. I want to show the same page for both above URLs. With different titles. Which has the id of 75. Currently it is reditrecting to 404

Read More
$_host = str_replace('-', ' ', str_replace('/', '', $_SERVER[REQUEST_URI]));
$_list = Array('Minicab in Wembley', 'Minicab in Pinner');

if ( is_404() && (in_array(strtolower($_host), array_map('strtolower', $_ist)))) {

}

How can I proceed?

Related posts

Leave a Reply

1 comment

  1. If you are on an Apache server you can do it by adding to your .htaccess file. Exact line to add depends a little on whether you want to redirect any/all of the various WordPress URLs or not, but something like:

    RedirectMatch ^(.*)/cab-in-chicago/?$ $1/cab-on-hollend
    

    Granted, this is not exactly what you asked because it is not driven from an array, but redirects done in .htaccess are way, way more performant than doing it in PHP, so do consider it.