Навигация

Итоги года

Другие ссылки


Реклама

Счётчики


Redirect using IIS, with query string

30.08.2007 Четверг 01:31

Suppose you want to redirect "http://raxxla.com" to "http://www.raxxla.com". In IIS create a new web site for the URL you want to be redirected ("http://raxxla.com"). On the Home Directory tab of the site's properties page, select A redirection to a URL radio button and specify destination URL ("http://www.raxxla.com"). At this point redirection will occur but query string will be lost (i.e. e.g. "http://raxxla.com/Journal.aspx?blogid=2" will be redirected to "http://www.raxxla.com". In order to enable redirection that keeps query string specify the following as destination URL:

<your URL>$V$Q

In our case,

http://www.raxxla.com$V$Q

Query string will be preserved while redirection.

Courtesy this.

More info on all suported parameters that can be used in redirection URL.