Hi all, I am trying to set up a redirect in wordpress (using redirection plugin). The source URL that I am redirecting from is in the format: www.site.com/concerts/concert-name/ Code (markup): And I am redirecting to www.site.com/concerts/concert-name/concert/ Code (markup): Basic rule is that if url contains "/concerts/" and ends with "/concert-name", then add "/concert" to the end of the url. I realise that this is messy, it is a temporary solution
$concerts = "www.site.com/concerts/concert-name/"; if (preg_match("/concerts/i",$concerts)){ $concerts = $concerts . "concerts/"; } Code (markup):