Possible Duplicate:
Apache rewrite based on subdomain
Is it possible to rewrite a URL like this?
www.foo.website.com/some-page
to
www.website.com/some-page?var=foo
I'm asking about a rewrite (I think that's what it's called) and not a redirect. i.e. I want the first URL to stay in the address bar, but for the server to "get" the second URL.
I've never understood how to do URL rewrites and so far my pathetic attempts to get this working have failed miserably :-)
I should add that this .htaccess file is also being used by WordPress and has the following code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~kbj/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~kbj/index.php [L]
</IfModule>
Any help or advice would be very much appreciated!