Subdomains redirect with parameters

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 2
Joined: 04 Apr 2014, 06:48

Subdomains redirect with parameters

04 Apr 2014, 07:24

Hi,
I need a site working in this mode:
it-it.mydomain.com (it for country, it for language)
it-en.mydomain.com (it for country, en for language)
it-es.mydomain.com (it for country, es for language)
en-it.mydomain.com (en for country, it for language)
en-en.mydomain.com (en for country, en for language)
en-es.mydomain.com (en for country, es for language)
etc etc

the code is all in http://www.mydomain.com

is possible to redirect it-en.mydomain.com to --> http://www.mydomain.com?country=it&language=en ?
the url should remain it-en.mydomain.com

Thank you :)

Ghiro

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Subdomains redirect with parameters

04 Apr 2014, 15:24

Ghiro,

What rules have you tried to use?

Regards

User avatar
Posts: 2
Joined: 04 Apr 2014, 06:48

Re: Subdomains redirect with parameters

11 Apr 2014, 07:58

Hi,
the problem is that I don't know how to configure rewrite with subdomains.
Usually I only use rewrite to load pages with querystring parameters.

Ghiro

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Subdomains redirect with parameters

11 Apr 2014, 09:40

It's very close, you can refer to FAQ (http://www.helicontech.com/forum/10648-FAQ.html) and Examples Section (http://www.helicontech.com/isapi_rewrit ... amples.htm).
Instead of using regexp in
Code: Select all
RewriteCond %{QUERY_STRING}
you'd use
Code: Select all
RewriteCOnd %{HTTP:Host}


Regards

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 13 guests