RewriteOptionsExtensions.AddRewrite 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
如果 RegEx 符合 HttpCoNtext 的 PathString,則加入重寫路徑的規則。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRewrite(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options, System::String ^ regex, System::String ^ replacement, bool skipRemainingRules);
public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRewrite (this Microsoft.AspNetCore.Rewrite.RewriteOptions options, string regex, string replacement, bool skipRemainingRules);
static member AddRewrite : Microsoft.AspNetCore.Rewrite.RewriteOptions * string * string * bool -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRewrite (options As RewriteOptions, regex As String, replacement As String, skipRemainingRules As Boolean) As RewriteOptions
參數
- options
- RewriteOptions
- regex
- String
要與 比較的 RegEx 字串。
- replacement
- String
如果 RegEx 相符,則要取代 URI 的內容。
- skipRemainingRules
- Boolean
如果 RegEx 相符,請有條件地停止處理其他規則。
傳回
重寫選項。