一个phpwind论坛,原来虚拟主机支持的是httpd.ini,现在换空间了,支持web.config,谁能够帮我把原来的httpd.ini改成web.comfig,谢谢
  原来 httpd.ini的内容
  [ISAPI_Rewrite]
   # 本规则是PHPWIND
   RewriteRule ^(.*)-htm-(.*)$   $1\.php\?$2
   RewriteRule ^(.*)simple/([t|f].+).html$ /simple/index.php?$2.html [NC]
   # Defend your computer from some worm attacks
   RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
  
   就上面这些,希望高手能够帮忙改下,我对这些不懂的

解决方案 »

  1.   

    iis7在手动添加伪静态的时候可以自己生成的,我当时生成的代码是:<?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="pw默认read-htm-tid-1.html">
                        <match url="^(.*)-htm-(.*)$" />
                        <action type="Rewrite" url="{R:1}.php?{R:2}" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>不过建议如果你用iis自带的那个web.config,建议用他的方法自己来生成
    比如读之前的地址{R:1}.php?{R:2},读之后的规则^(.*)-htm-(.*)$你用我这个默认的可能会报错。
    另外不建议用iis自带的web.config,建议还是装rewrite!
    我以前写过教程的,地址是http://phpwind.me/126.html