关于CI框架路由的问题
大家好:最近在使用Window 2008 IIS7 但是遇到个问题,就是在服务器上运行CI框架 , 访问的时候 出现404 报错
默认运行的index.php/index/index是没有问题的但是在不使用index.php 的情况下就无法访问别的方法和文件
404 - File or directory not found.The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
但是这个代码在linux nginx 上运行是没有问题的,请各位帮忙解释下 这该怎么解决..... 碰到了类似的问题,求解决 nginx的rewrite书写规则跟IIS是不同的,重新写个IIS的rewrite把请求转到index.php 在web.config里加上
<rule name="WwwPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^365zzy.me$" />
<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> 设置下web.config解决
页:
[1]