I am using the following directive in my .htaccess
file:
RedirectMatch 301 ^/user/(.*)?$ http://$1.example.com/user/$1
to redirect the URL
example.com/user/koko/
but it redirects to http://koko/.example.com/user/koko
instead of http://koko.example.com/user/koko
.
How can I remove the extra slash from http://koko/.example.com/user/koko
?
I have tried a couple of answers that I found here but it did not work.