Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
url rewritting in iis 7
ib bellad
7y
165
1
Reply
Hi,
I wann redirect the url from https://www.subdomain.domain.com or www.subdomain.domain.com to https://www.subdomain.domain.com. When user enter the URL with "www" its showing 'privacy error' and i had purchased the wildcard ssl certificate. and also wriitten code in web.config file:
<
rewrite
>
<
rule
name
=
"Remove WWW and Ensure HTTPS"
stopProcessing
=
"false"
>
<
match
url
=
"^(.*)$"
/>
<
conditions
logicalGrouping
=
"MatchAny"
>
<
add
input
=
"{HTTP_HOST}"
pattern
=
"^(www\.)"
/>
<
add
input
=
"{HTTPS_HOST}"
pattern
=
"^https://www\.(.*)\.(.*)\.(.*)$"
/>
<
add
input
=
"{HTTPS}"
pattern
=
"^OFF$"
/>
</
conditions
>
<
serverVariables
/>
<
action
type
=
"Redirect"
url
=
"https://{HTTPS_HOST}{REQUEST_URI}"
/>
</
rule
>
</
rules
>
</
rewrite
>
Thanks in Advance
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
What does the Orientation property do in a Menu control?
How to achieve Remote validation from Fluent validation mvc5