I have two specific URL which are being redirected with 301 redirect in my .htaccess file like below:
redirect 301 /old-url-1/ http://www.domain.com/new-url-3/
redirect 301 /old-url-2/ http://www.domain.com/new-url-3/
Now problem is with URL structure like this:
http://www.domain.com/old-url-1/sub-url/ or http://www.domain.com/old-url-2/sub-url/ which is not getting to desired path on redirected url to
http://www.domain.com/old-url-1/sub-url/.
How can I only match /old-url-1/ part, and redirect in that case, in all other cases just follow original path like /old-url-1/sub-url/?
**Desired effect is like this:
If someone goes to:
http://www.domain.com/old-url-1/ redirect visitor to http://www.domain.com/new-url-3/, but if someone goes to http://www.domain.com/old-url-1/sub-url/keep visitor on that URL, and don't redirect to http://www.domain.com/new-url-3/sub-url.