开发框架 版主:迅睿框架研发组
iis7.5伪静态无效 iis环境下伪静态问题
类型:迅睿CMS 更新时间:2022-08-28 19:28:00 iis伪静态

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule !.(js|ico|gif|jpe?g|bmp|png|css)$ /index.php [NC,L]



iis7.5伪静态规是无效

回帖
  • 一盘散沙
    #1楼    一盘散沙
    2022-08-13 09:43:06
    Chrome 0
  • 找寻知音
    #2楼    找寻知音
    2022-08-17 08:02:46
    Edge 0
    安装URL重写,根目录储存 web.config:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="已导入的规则 1" stopProcessing="true">
                        <match url=".(js|ico|gif|jpe?g|bmp|png|css)$" negate="true" />
                        <conditions logicalGrouping="MatchAll">
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="/index.php" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
  • 迈克
    #3楼    迈克
    2022-08-20 10:40:30
    Chrome 0
    还那么多人用iis,有条件还是可以切换为nginx,或者 apache,从兼容性方便都比较好些。
  • 杨慕颜
    #4楼    杨慕颜
    2022-08-24 09:39:51
    Chrome 0
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                  <rule name="Imported Rule 1" stopProcessing="true">
                        <match url=".(js|ico|gif|jpe?g|bmp|png|css)$" negate="true" />
                        <conditions logicalGrouping="MatchAll">
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="/index.php" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
  • 子语
    #5楼    子语
    2022-08-28 19:28:00
    Chrome 0
    论坛搜索下就有