对于IIS 7来说,这是一个很新的东西,所以如果这是一个简单的道歉。
我已经使用Windows Server 2008 R2上的Webstart安装程序安装了Drupal 7。 Drupal使自己的404和403错误页面。 当我打开服务器上的Internet Explorer并testing它们时,它们工作正常。
但是,从远程机器:
我猜这是一个权限问题,但我找不到任何改变。
有任何想法吗?
谢谢,
弗雷德里克
问题是与您的网站的IIS web.config文件。
这篇文章帮助我克服了这个问题: http : //www.evanclosson.com/devlog/iis7httperrorsconfigurationonlockdown 。
请在drupal群组上阅读以下文章: http : //groups.drupal.org/node/25421
否则,你可以使用我的configuration文件下面。
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <!-- Don't show directory listings for URLs which map to a directory. --> <directoryBrowse enabled="false" /> <rewrite> <rules> <rule name="Protect files and directories from prying eyes" stopProcessing="true"> <match url=".(engine|inc|info|install|module|profile|test|po|sh|.sql|postinst.1|theme|tpl(.php)?|xtmpl|svn-base)$|^(code-style.pl|Entries.|Repository|Root|Tag|Template|all-wcprops|entries|format)$" /> <action type="CustomResponse" statusCode="403" subStatusCode="0" statusReason="Forbidden" statusDescription="Access is forbidden." /> </rule> <rule name="Force simple error message for requests for non-existent favicon.ico" stopProcessing="true"> <match url="favicon.ico" /> <action type="CustomResponse" statusCode="404" subStatusCode="1" statusReason="File Not Found" statusDescription="The requested file favicon.ico was not found" /> </rule> <!-- Rewrite URLs of the form 'x' to the form 'index.php?q=x'. --> <rule name="Short URLS" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> <httpErrors> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" /> <remove statusCode="403" subStatusCode="-1" /> <error statusCode="403" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" /> </httpErrors> <defaultDocument> <!-- Set the default document --> <files> <remove value="index.php" /> <add value="index.php" /> </files> </defaultDocument> </system.webServer> </configuration>