web.config 301

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <!-- <httpRedirect enabled="true" destination="http://www.some.com/" exactDestination="true" httpResponseStatus="Permanent" /> -->
        <rewrite>
            <rules>
                <rule name="WWWR" stopProcessing="true">
                    <match url=".*" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^some.com$" />
                    </conditions>
                    <action type="Redirect" url="http://www.some.com/{R:0}" />
                </rule>
                <rule name="Wapcms">
                    <match url="^(.*)$" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php/{R:1}" logRewrittenUrl="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

 

posted @ 2017-07-27 16:49  为知  阅读(244)  评论(0编辑  收藏  举报