2012-11-05 1 views
1

많은 URL 다시 쓰기 규칙이 있습니다 (모두 아래에 나열되어 있습니다). "http://domain.com"을 탐색 할 때 "잠재적으로 위험한 Request.Path 값이 클라이언트 (:)에서 발견되었습니다"라는 메시지와 함께 "http://www.domain.com/R :"으로 전달됩니다. . " "www"없이 사이트를 탐색하고 올바르게 전달할 수 있기를 바랍니다. 업데이트하거나 기존의 재 작성 규칙을 추가하는 방법을 모르겠습니다. 이것은 닷넷 사이트입니다. 나는 지역 사회의 누군가가 나에게 어떤 힌트를 줄 수 있기를 바라고있다.URL 다시 쓰기 - 잠재적으로 위험한 Request.Path 값이 클라이언트에서 감지되었습니다.

<rewrite> 
<rules> 
    <clear /> 
    <rule name="Change to Lower" enabled="true"> 
     <match url="[A-Z]" ignoreCase="false" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> 
     <action type="Redirect" url="{ToLower:{URL}}" redirectType="Permanent" /> 
    </rule> 
    <rule name="Redirect to WWW" enabled="true" stopProcessing="true"> 
     <match url=".*" ignoreCase="false" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
     <add input="{HTTP_HOST}" pattern="^domain.com$" /> 
     </conditions> 
     <action type="Redirect" url="http://www.domain.com/R:{0}" redirectType="Permanent" /> 
    </rule> 
    <rule name="Redirect StockNo" stopProcessing="true"> 
     <match url="^vehicles/detail/default\.aspx$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> 
      <add input="{QUERY_STRING}" pattern="^stockno=([^=&amp;]+)$" /> 
     </conditions> 
     <action type="Redirect" url="{C:1}" appendQueryString="false" /> 
    </rule> 
    <rule name="Rewrite StockNo" stopProcessing="true"> 
     <match url="^([0-9a-z\ ]+)$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
     </conditions> 
     <action type="Rewrite" url="vehicles/detail/default.aspx?stockno={R:1}" /> 
    </rule> 
    <rule name="Redirect StockNo And Desc" enabled="false" stopProcessing="true"> 
     <match url="^vehicles/detail/default\.aspx$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> 
      <add input="{QUERY_STRING}" pattern="^stockno=([^=&amp;]+)&amp;desc=([^=&amp;]+)$" /> 
     </conditions> 
     <action type="Redirect" url="{C:1}/{C:2}" appendQueryString="false" /> 
    </rule> 
    <rule name="Rewrite StockNo And Desc" enabled="false" stopProcessing="true"> 
     <match url="^([0-9a-z]+)/([0-9]{4}[^/]+)/?$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
     </conditions> 
     <action type="Rewrite" url="vehicles/detail/default.aspx?stockno={R:1}&amp;desc={R:2}" /> 
    </rule> 
    <rule name="Redirect StockNo Desc And Vin" stopProcessing="true"> 
     <match url="^vehicles/detail/default\.aspx$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> 
      <add input="{QUERY_STRING}" pattern="^stockno=([^=&amp;]+)&amp;desc=([^=&amp;]+)&amp;vin=([^=&amp;]+)$" /> 
     </conditions> 
     <action type="Redirect" url="{C:1}/{C:2}/{C:3}" appendQueryString="false" /> 
    </rule> 
    <rule name="Rewrite StockNo Desc And Vin" stopProcessing="true"> 
     <match url="^([0-9a-z]+)/([0-9]{4}[^/]+)/([0-9a-z]+)/?$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
     </conditions> 
     <action type="Rewrite" url="vehicles/detail/default.aspx?stockno={R:1}&amp;desc={R:2}&amp;vin={R:3}" /> 
    </rule> 
    <rule name="Redirect Make And Model" stopProcessing="true"> 
     <match url="^vehicles/default\.aspx$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> 
      <add input="{QUERY_STRING}" pattern="^make=([^=&amp;]+)&amp;model=([^=&amp;]+)$" /> 
     </conditions> 
     <action type="Redirect" url="{C:1}/{C:2}" appendQueryString="false" /> 
    </rule> 
    <rule name="Rewrite Make And Model" stopProcessing="true"> 
     <match url="^([a-z\ ]+)/([a-z\ ]+)/?$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
     </conditions> 
     <action type="Rewrite" url="vehicles/default.aspx?make={R:1}&amp;model={R:2}" /> 
    </rule> 
    <rule name="Redirect Make Model And SubModel" stopProcessing="true"> 
     <match url="^vehicles/default\.aspx$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> 
      <add input="{QUERY_STRING}" pattern="^make=([^=&amp;]+)&amp;model=([^=&amp;]+)&amp;submodel=([^=&amp;]+)$" /> 
     </conditions> 
     <action type="Redirect" url="{C:1}/{C:2}/{C:3}" appendQueryString="false" /> 
    </rule> 
    <rule name="Rewrite Make Model And SubModel" stopProcessing="true"> 
     <match url="^([a-z\ ]+)/([a-z\ ]+)/([a-z\ ]+)/?$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
     </conditions> 
     <action type="Rewrite" url="vehicles/default.aspx?make={R:1}&amp;model={R:2}&amp;submodel={R:3}" /> 
    </rule> 
    <rule name="Redirect Make An Offer StockNo" stopProcessing="true"> 
     <match url="^Vehicles/Make-An-Offer\.aspx$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> 
      <add input="{QUERY_STRING}" pattern="^stockno=([^=&amp;]+)$" /> 
     </conditions> 
     <action type="Redirect" url="Vehicles/Make-An-Offer/{C:1}" appendQueryString="false" /> 
    </rule> 
    <rule name="Rewrite Make An Offer StockNo" stopProcessing="true"> 
     <match url="^Vehicles/Make-An-Offer/([^/]+)/?$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
     </conditions> 
     <action type="Rewrite" url="Vehicles/Make-An-Offer.aspx?stockno={R:1}" /> 
    </rule> 
    <rule name="Redirect Make An Offer StockNo And Desc" stopProcessing="true"> 
     <match url="^Vehicles/Make-An-Offer\.aspx$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> 
      <add input="{QUERY_STRING}" pattern="^stockno=([^=&amp;]+)&amp;desc=([^=&amp;]+)$" /> 
     </conditions> 
     <action type="Redirect" url="Vehicles/Make-An-Offer/{C:1}/{C:2}" appendQueryString="false" /> 
    </rule> 
    <rule name="Rewrite Make An Offer StockNo And Desc" stopProcessing="true"> 
     <match url="^Vehicles/Make-An-Offer/([^/]+)/([^/]+)/?$" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
     </conditions> 
     <action type="Rewrite" url="Vehicles/Make-An-Offer.aspx?stockno={R:1}&amp;desc={R:2}" /> 
    </rule> 
    <rule name="Redirect to Default" enabled="true"> 
     <match url="(.*)default.aspx" ignoreCase="false" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> 
     <action type="Redirect" url="{R:1}" redirectType="Permanent" /> 
    </rule> 
    <rule name="Add Trailing Slash" enabled="true"> 
     <match url="[^/]$" ignoreCase="false" /> 
     <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
      <add input="{URL}" pattern="\.axd$" ignoreCase="false" negate="true" /> 
     </conditions> 
     <action type="Redirect" url="{URL}/" appendQueryString="false" redirectType="Permanent" /> 
    </rule> 
</rules> 
<outboundRules> 
    <preConditions> 
     <preCondition name="ResponseIsHtml1"> 
      <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /> 
     </preCondition> 
    </preConditions> 
</outboundRules> 
<rewriteMaps> 
    <rewriteMap name="test" /> 
</rewriteMaps> 

답변

2

당신의 둘째 규칙에서, 그것은 R과 같습니다가 괄호로 묶여되지 않습니다

http://www.domain.com/R:{0}는 것을 지적 http://www.domain.com/{R:0}

+0

감사해야합니다! – obautista

+0

// {HTTP_HOST} : 82/{R : 0}으로 리디렉션 할 때도 같은 이유로 죽습니다. 그러나 반드시 ": 82"를 사용해야합니다. 다음 게시물에서 볼 수있는 것과 동일한 문제가 있지만 해결 방법이 아니라 원인을 제공합니다. http://stackoverflow.com/questions/13529307/rewrite-url-to-urlport-number – rainabba

관련 문제