我有一个在Linux环境中运行的codeigniter应用程序,希望将其迁移到Windows环境。
我通过FTP迁移了文件。主页可以正确处理图像和样式,但是链接没有显示错误404。
它与htaccess和web.config有关吗?
通过为Web.config重写htaccess并更改base_url来解决。
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句