私はURL Rewriter.NETを使用しています(これはURL Rewriting.NETと比較して、たくさん好きです - もっとうまくいくようですが、間違ってはいない、私はURL書き換えが好きです.NET。しかし、私がツールの知っていることを考えれば、それは必要性を満たすようには見えなかった)。私はdefault-documentsノードを使用してサイトのデフォルトドキュメントを再定義しようとしています。私はリライターノードに追加しようとしましたが、私は、web.configファイルのエラーURL Rewriter.NET web.configノードの問題
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The element 'default-documents' is not allowed.
Source Error:
Line 187:
Line 188: <rewriter>
Line 189: <default-documents>
Line 190: <document>default.aspx</document>
Line 191: <document>index.aspx</document>
は、誰もが過去にこのツールを使用しています取得し、誰もがどここのノード(または適切な使用法を)置くかわかりませんか?
EDIT:
私は以下の提案を試してみましたが、全く正しい動作していないようでした。ここで私は前にURLリライタ使用し、実際にも、既定のドキュメントを設定するといくつかの問題を持っていた(これは、設定ファイルの内容だけである)
<rewriter>
<rewrite url="^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|\.js)(\?.+)?)$" to="$1" processing="stop" />
<default-documents>
<document>default.aspx</document>
<document>index.aspx</document>
</default-documents>
</rewriter>
"正しく動作していないようです"とは、デフォルト文書を使用していないということですか?もしそうなら、以下の私の編集をチェックしてください。 – Moose