I'm trying to automatically redirect a large number of subdomains to subfolders. Here's what I'm trying to do:
http://gerard.joling.easybookings.nl/ --> http://www.easybookings.nl/gerard-joling/
I'd like to replace dots in subdomains with dashed in subfolders. I currently have this regular expression/rewriterule:
RewriteEngine on RewriteCond %{HTTP_HOST} ^([a-z]+)\.([a-z]+)\.easybookings\.nl$ RewriteRule ^(.*)$ http://www.easybookings.nl/artiesten/$1\-$2 [R=301,L]
This rewriterule returns "www.easybookings.nl/artiest/-".