Solved

IIS 7.5 URLRewrite to add a suffix. How?

Posted on 2014-01-05
1
160 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
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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

Suggested Solutions

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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