6

ASP.NET アプリケーションに Prerender.io を実装しようとしています。必要なすべての必要な手順を構成しました

1) <meta name="fragment" content="!">Index.html の先頭

2) モジュールの構成

 <httpModules>
      <add name="Prerender" type="Prerender.io.PrerenderModule, IslamicMatchMakers.Web, Version=1.0.0.0, Culture=neutral" />
    </httpModules>

3) カスタムヘッダーを追加

 <httpProtocol>
      <customHeaders>
        <add name="X-Prerender-Token" value="XXXX" />
      </customHeaders>
    </httpProtocol>

4) 書き換えルールの定義

<rewrite>
      <rules>

        <!--# Only proxy the request to Prerender if it's a request for HTML-->
        <rule name="Prerender" stopProcessing="true">
          <match url="^(?!.*?(\.js|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.doc|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent))(.*)" ignoreCase="false" />
          <conditions logicalGrouping="MatchAny">
            <add input="{HTTP_USER_AGENT}" pattern="baiduspider|facebookexternalhit|twitterbot" />
            <add input="{QUERY_STRING}" pattern="_escaped_fragment_" ignoreCase="false" />
          </conditions>
          <action type="Rewrite" url="http://service.prerender.io/http://{HTTP_HOST}/{R:1}" />
        </rule>

        <rule name="Html5Mode" stopProcessing="true">
          <match url=".*" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{URL}" pattern="/scripts/" negate="true" />
            <add input="{URL}" pattern="/content/" negate="true" />
          </conditions>
          <action type="Rewrite" url="/" />
        </rule>
      </rules>
    </rewrite>

5) IIS にアプリケーション リクエスト ルーティング モジュールをインストールし、プロキシを有効にしました。これがどのように見えるかのイメージです: ARR

これらすべての構成の後、http://localhost:2525?_escaped_fragment_=にリクエストを送信すると、

空白のページが表示されるだけです。何が欠けているのかわかりません。誰か提案してください。

4

1 に答える 1