|
Hi all,
Sorry if this is an idiot question but I'm an idiot.
I have a site which uses third-party data which I'm trying to localise using virtual subdomains mapped to one variable in the querystring, for example:
london.mysite.com would map to mysite.com/index.php?region=45
I'm using a php-generated rewrite map. Problem I'm having is, I'd like the rewrite rule to apply to any page on the site, but preserve the rest of the querystring, so where I currently have:
mysite.com/index.php?wldsite=2917&mygender=2&gender=1&minage=18&maxage=50®ion=45&x=120&y=20
I'd like it to map to
london.mysite.com/index.php?wldsite=2917&mygender=2&gender=1&minage=18&maxage=50&x=120&y=20
and
mysite.com/tellafriend.php?wldsite=2917&mygender=2&gender=1&minage=18&maxage=50®ion=45&x=120&y=20
to
london.mysite.com/tellafriend.php?wldsite=2917&mygender=2&gender=1&minage=18&maxage=50&x=120&y=20
Is this possible just using mod_rewrite, or am I wasting my time?
|