Solved

How do write this URL Rewrite Rule for IIS

Posted on 2016-10-17
3
86 Views
Last Modified: 2016-10-18
How do I create URL Rewrite rule for IIS that will temporarily redirect any requested URL to my ShutDown.cfm page?

This will go into my web.config file which already has a few rewrites.

This is a microsoft server.

I need to show the ShutDown.cfm page while I do maintenance.
0
Comment
Question by:bigmikey88
[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
3 Comments
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 250 total points
ID: 41847711
you can add a rule like this:

<rule name="Redirect all to Shutdown" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Redirect" url="shutdown.cfm" />
                </rule>

Open in new window

0
 
LVL 17

Assisted Solution

by:Emmanuel Adebayo
Emmanuel Adebayo earned 250 total points
ID: 41847812
If you are running IIS 7 or above with ASP.NET role service enabled, you can install URL Rewrite Module. You can then create a rewrite rule by using URL Rewrite UI in IIS Manager by
    Go to IIS Manager.
    Select Default Web Site.
    In the Feature View click URL Rewrite.

For more info visit the link below
https://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module
Regards
0
 

Author Closing Comment

by:bigmikey88
ID: 41848739
many thanks  

Michael
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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