So trough the big hassle of this finding for the right script and yadayadayada I now have a CNAME redirecting myawesomeblog.mysite.com to mysite.com/?blog=myawesomeblog and a .htaccess code like the following
RewriteEngine On
# Prevent people from going to to index.php directly and spoofing the
# subdomain value, since this may not be a desirable action
RewriteCond %{THE_REQUEST} ^[A-Z]+\index\.php.*(\?|&)blog=
RewriteRule ^.*$ http://%{HTTP_HOST}/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} !^www
RewriteCond %{HTTP_HOST} ^([^\.]+)\.([^\.]+)\.([^\.]+)$
RewriteRule ^.*$ index.php?blog=%1
It all works, except that I need to get *.mysite.com/?get=something&get2=something-more working as well, I have no idea how to make it happen tho’
All help is appreciated.
You probably need an extra flag to your rules:
R as in redirect. L as in last. QSA as in query string append.