I want to write a rewrite scheme such that:
user1.example.net will redirect to example.net/user/user1 user2.example.net will redirect to example.net/user/user2
vise versa
this is what i have in my .htaccess code. but it always redirects to example.net
RewriteCond %{http_host} ^[^.]+.example.net [NC] RewriteRule ^([^.]+).example.net(.*) http://example.net/user/$1 [R=301,L]
can someone please tell me what i did wrong? thank you.