Redirect parent taxonomy to it’s child

Assuming state and city are variable path segments, so you are essentially redirecting /investments/<one>/<two>/ to /investments/<two>/ then try the following at the top of your .htaccess file:

# Redirect "/investments/<one>/<two>/" to "/investments/<two>/"
RewriteRule ^(investments)/[^/]+/([^/]+)/$ /$1/$2/ [R=302,L]

If you need any further explanation then just ask in comments.

UPDATE: I’ve added an end-of-string anchor ($) to the end of the RewriteRule pattern in the above directive.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)