How do write this URL Rewrite Rule for IIS

bigmikey88
bigmikey88 used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Team Lead
Commented:
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

Emmanuel AdebayoGlobal Windows Infrastructure Engineer - Consultant
Top Expert 2013
Commented:
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

Author

Commented:
many thanks  

Michael

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial