htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Virtual subdomain mapping to querystring variable
PostPosted: 30 Sep 2008 10:39 
Offline

Joined: 30 Sep 2008 10:25
Posts: 1
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&region=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&region=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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: MSNbot Media and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB