IIS搭建thinkPHP项目环境提示重定向过多

玩完丸蛋 2017-12-19 06:40:37
用phpStudy的搭建就没问题,软件里的重写规则也有
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
#RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1] //phpStudy
</IfModule>

但是phpStudy里需要用RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]这个重写才能访问软件首页
我用的phpStudyforiis可以访问phpinfo文件,都没问题,我的web.config里配置的重写,网上也查不到别的信息了
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>

<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>

</system.webServer>
</configuration>

请大侠给看看 项目是开源的ERP https://gitee.com/crm8000/PSI 大侠可以帮忙在IIS里给测试下
...全文
810 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

8,327

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 IIS
社区管理员
  • IIS
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧