I have a site, say http://es.misitio.com
, and I need to use .htaccess to redirect the URL (using the subdomain to add it as a subdirectory) to http://www.misitio.com/es
.
The same for
http://en.misitio.com => http://www.misitio.com/en
http://fr.misitio.com => http://www.misitio.com/fr
http://de.misitio.com => http://www.misitio.com/de
This is what I have:
RewriteCond %{HTTP_HOST} ^www.misitio.com$ [NC]
RewriteRule ^(.*)$ http://www.misitio.com/$1 [R=301,L]