Solved

IIS 7.5 URLRewrite to add a suffix. How?

Posted on 2014-01-05
1
172 Views
Last Modified: 2016-04-09
Hi.

I'm using IIS 7.5 and I need to use URLRewrite module to force the "https://www." suffix to any URLs that don't have that.

For example:

a. domain.com should become https://www.domain.com

b. domain.com/abc/xyz.aspx should become https://www.domain.com/abc/xyz.aspx

c. https://domain.com should become https://www.domain.com

d. https://domain.com/abc/xyz.aspx should become https://www.domain.com/abc/xyz.aspx


I'm having a hard time writing that script. Any helps are greatly appreciated.

Thanks in advance,

Helder Conde
0
Comment
Question by:HelderConde
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 63

Accepted Solution

by:
btan earned 500 total points
ID: 39758565
May want to see this

http://forums.iis.net/t/1153050.aspx?URL+Rewrite+for+SSL+redirection
http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/


<rewrite>
<rules>
    <clear />
    <rule name="Force HTTPS" enabled="true">
        <match url="(.*)" ignoreCase="false" />
        <conditions>
            <add input="{HTTPS}" pattern="off" />
        </conditions>
        <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="true" redirectType="Permanent" />
    </rule>
</rewrite>

Also the below tips can come handy
http://ruslany.net/2009/04/10-url-rewriting-tips-and-tricks/
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Two wordpress questions 3 81
exchange, email gateway 2 57
SSL - A Registrar-Level Change? 4 34
Converting a certificate into a PEM 2 64
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question