Solved

IIS 7.5 URLRewrite to add a suffix. How?

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

778 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