301 Redirects
Hi,
We have a client running the latest version of Sitefinity Standard and we are curious to know how to configure redirects to the main host name for every other host name that points to the site.
Thanks!
@Sitefinity
Any articles or any response would be appreciated...it's been 4 days....
Hi Elie,
For creating redirects from other hostnames to main hostname, better to use IIS rewrite module.
So, you need to install this module www.iis.net/.../url-rewrite (may be already installed)
Then, add inside you web.config place rewrite rule (just replace b.site.local) with your domain name
<
rule
name
=
"Redirect To Main Domain"
stopProcessing
=
"true"
>
<
match
url
=
".*"
/>
<
conditions
>
<
add
input
=
"HTTP_HOST"
pattern
=
"^b.site.local$"
negate
=
"true"
/>
</
conditions
>
<
action
type
=
"Redirect"
url
=
"http://b.site.local/R:0"
/>
</
rule
>
Thanks Victor, i'll let you know if this doesn't work.
Elie