Solved

IIS 7.5 URLRewrite to add a suffix. How?

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

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now