开发者

IIS Redirect To SubFolder

I am trying to redirect a url to a subfolder, for example:

http://localhost/test is what the user will input, but I want tha开发者_JS百科t to redirect to http://localhost/test/public

I can't find any resource on the web, and most resources I found is on Apache which doesn't help.

Thanks.

PlayKid


In your web.config file in the Root of the site you would put something like this:

<?xml version="1.0"?>
<configuration>
    <location path="test">
        <system.webServer>
            <httpRedirect enabled="true" destination="test/public" httpResponseStatus="Permanent" />
        </system.webServer>
    </location>
</configuration>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜