0

ここでイライラする問題があります。何が原因なのかよくわかりません。私の Drupal サイトは、IIS 7 を搭載した Windows サーバーで実行されています。http://example.com/adminページに移動すると、403 エラーが発生します。ただし、http://example.com/ ?q=user でログインしてから /admin に移動すると、正常に動作します。IIS の設定に何か問題があるか、何らかのアクセス許可が間違っていると思います。私のサイトのルート ディレクトリには管理ディレクトリがないため、不正なフォルダが問題を引き起こすことはありません。何か案は??

これが私のweb.configです..

<?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|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$" />
          <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>
            <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" />
            <!--<add input="{REQUEST_URI}" pattern="^/(gallery2|message-boards)" 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" />
    </httpErrors> 
    -->



    <defaultDocument>
      <!-- Set the default document -->
      <files>
        <remove value="index.php" />
       <add value="index.php" />
      </files>
    </defaultDocument>
       <staticContent>
            <mimeMap fileExtension=".woff" mimeType="application/x-woff" />
        </staticContent>
   </system.webServer>
</configuration>
4

1 に答える 1

0

/?q=user は、クリーン URL が有効になっていないことを意味します。

/?q=admin に移動してログインしてみてください。次に、サイトのルート ディレクトリに .htaccess があることを確認します (非表示になっているため、使用しているプラ​​ットフォームで「隠しファイルを表示する」を有効にする必要があります)。

そこにあることを確認したら-隠しファイルを表示してDrupalを再ダウンロードしてファイルを取得しない場合-キャッシュをクリアし、「構成」->「検索とメタデータ」->「クリーンURL」->有効に移動します

于 2013-03-19T05:15:22.900 に答える