将.htaccess文件设置为web.config时出现内部服务器错误 [英] Getting internal server error when setting up .htaccess file to web.config
本文介绍了将.htaccess文件设置为web.config时出现内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好b $ b
我正在尝试在Windows服务器上传codeigniter网站项目。当我在Windows服务器上传项目时,我的索引页面运行完美但当我输入用户名和密码登录页面时出现错误消息 -
Hi
I am trying to upload codeigniter website project on windows server. When I uploaded project on windows server my index page running perfectly but when I enter username and password to login page an error come with message - "
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.Detailed Error Information:
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070003
Config Error Cannot read configuration file
Config File \\?\D:\Inetpub\vhosts\sp-tapi.in\clean-note.rudra-infotech.com\test\web.config
Requested URL http://clean-note.rudra-infotech.com:80/test
Physical Path D:\Inetpub\vhosts\sp-tapi.in\clean-note.rudra-infotech.com\test
Logon Method Not yet determined
Logon User Not yet determined
我尝试过:
What I have tried:
I have converted my .htaccess file to web.config for IIS server (using IIS 8.5)
my web.config file is
<pre><?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rule 1S" stopProcessing="true">
<match url="^(.*)$" />
<action type="Rewrite" url="/index.php/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" path="/somedir/oops404.htm" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
<system.web>
<customErrors mode="Off" />
</system.web>
</configuration>
推荐答案
/>
< action type =Rewriteurl =/ index.php / {R:1}appendQueryString =true/>
< / rule>
< / rules>
< /重写>
< httpErrors>
< remove statusCode =404subStatusCode = - 1/>
< error statusCode =404path =/ somedir / oops404 .htmresponseMode =ExecuteURL/>
< / httpErrors>
< /system.webServer>
< system.web>
< customErrors mode = 关闭/>
< /system.web>
< / configuration>
" /> <action type="Rewrite" url="/index.php/{R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> <httpErrors> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" path="/somedir/oops404.htm" responseMode="ExecuteURL" /> </httpErrors> </system.webServer> <system.web> <customErrors mode="Off" /> </system.web> </configuration>
错误消息非常清楚:应用程序无法读取位于以下位置的文件:
The error message is quite clear: the application is unable to read the file located at:
D:\Inetpub\vhosts\sp-tapi.in\clean-note.rudra-infotech.com\test\web.config
检查该文件的NTFS权限是否授予对IIS_IUSRS组的读取权限,或者是哪个帐户哟你的AppPool设置为。
Check that the NTFS permissions for that file grant read access to the IIS_IUSRS group, or whichever account your AppPool is set to run as.
这篇关于将.htaccess文件设置为web.config时出现内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文