简体   繁体   中英

IIS URL Rewrite - Page Forward

I've been messing around with a URL rewrite for a bit now, however, I can't get it work despite going through the documentation - so it's probably just my lack of knowledge on them.

I have the following URL:

www.testsite.company.com/tasks

I however want to forward any request to this URL to:

www.testsite.company.com/tasks/dashboard

How would I accomplish this using IIS URL Rewrite rules?

Any help would be appreciated, thank you.

You could try to use the below rule:

 <rule name="Forward rule" stopProcessing="true">
                <match url="(.*)" />
                <conditions>
                    <add input="{REQUEST_URI}" pattern="^/tasks/$" />
                </conditions>
                <action type="Redirect" url="http://example.com/tasks/dashboard" />
            </rule>

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM