In my wordpress
site I need do do below redirect.
http://www.mydomain.com/magazine-landing/lon-mayf/
to the http://www.mydomain.com/magazine-landing/?code=lon-mayf
Here lon-mayf
can be anything.
I’ve tried below code in .htaccess
file after # END WordPress
but it is not work.
RewriteEngine On
RewriteRule ^magazine-landing/*$ www.mydomain.com/magazine-landing/?magcode=$1 [R=301,L]
How could I do this redirect?
Thanks.
Read more here: .htaccess redirect URL last part to same URL query strings value?