I am close to achieving my goal but I cannot come up with the correct solution to my problem.
I have written the following rules for my wildcard subdomains:
#remove www.
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain\.com/$1 [R=301,L]
#rewrite subdomains to /club/<clubname as defined by subdomain>/<whatever was here before>
RewriteCond %{HTTP_HOST} ^(.+)\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/club/%1/$0 [NC,L]
This is desperately close to what I require, ie if I go to http://alpha.domain.com/some/string/here the URL is rewritten to http://domain.com/club/alpha/some/string/here
however
I would like the url in browser to still look like the original url
Many thanks in advance
EDIT: I have tried just adding PT to the final rule but that doesn't work, I get a 400 error
EDIT2: For anyone interested, I abandoned this line of enquiry and instead used php to read the text in the subdomain.