分类 开发 下的文章

DELETE FROM tbname WHERE id IN (
    SELECT id from (
        SELECT id FROM tbname  WHERE oldurl in(
            SELECT oldurl FROM tbname  GROUP BY oldurl HAVING count(oldurl) > 1)
            AND id  not IN(SELECT min(id) FROM tbname  GROUP BY oldurl HAVING count(oldurl) > 1)
    ) as t
);

<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<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}" />
</rule>
</rules>
</rewrite>