Virtual subdomain by url rewrite

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
mikeQuebec
Forum Newbie
Posts: 1
Joined: Fri Jun 26, 2009 1:04 pm

Virtual subdomain by url rewrite

Post by mikeQuebec »

Hi everyone

Can someone help me to rewrite a url to create virtual subdomaine.

I may be wrong but I think it is apache the will generate the subdomain.

I already get the city from a php script, all I want to do is to rewrite my url using my script city name value.

http://www.myfakesite.com would give http://quebec.myfakesite.com, http://montreal.myfakesite.com and so on based on the visitor's detected city. I know, it may give strange results and may be innacurate sometimes but I need to do it.

Thanks for your answers.
Post Reply