0

単一ページのアプリケーション Web サイト (www.myexample.com にあると仮定) に SEO を実装したいと考えています。

Google のドキュメント ( https://developers.google.com/webmasters/ajax-crawling/docs/getting-started ) を読んだ後、Web サイトのホームページでこれを試すことから始めました。つまり、 www.myexample.com?_escaped_fragment_= は www.myexample.com/staticIndex.html に「マップ」する必要があります

Web サイトの public_html フォルダーにある .htaccess ファイルに以下を追加しました。

RewriteEngine on
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=
RewriteRule ^_escaped_fragment_= /staticIndex.html [PT]

この変更後、ブラウザで www.myexample.com?_escaped_fragment_= という URL を試すと、ブラウザには staticIndex.html ファイルのコンテンツが表示されると思っていましたが、代わりに www.myexample.com (index.html) のコンテンツが表示されます。ブラウザの URL は www.myexample.com?_escaped_fragment_= のまま変更されません

誰かが RewriteRule を手伝ってくれませんか?

ありがとう。

4

1 に答える 1

2

これを試して:

RewriteEngine on
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=$
RewriteRule (.*) staticIndex.html [PT]
于 2013-04-05T21:42:41.883 に答える