如何一一获取所有request.querystring

How to get all request.querystring one by one

这是我的代码,在这段代码中我得到了 request.querystring("id") 例如。 www.site.com/q

但我需要所有 request.querystring 单独的名称,例如。 www.site.com/q1/q2/q3/q4

如何设置所有 request.querystring 名称并通过此 we.config 获取数据?

<?xml version="1.0"?>
<configuration>
  <system.webServer>
    <rewrite>
    <rules>
    <rule name="DeduplicateSlashes" stopProcessing="true">
      <match url="." ignoreCase="false" />
      <conditions>
        <add input="{URL}" pattern="^(.*)//(.*)$" ignoreCase="false" />
      </conditions>
      <action type="Redirect" redirectType="Permanent" url="{C:1}/{C:2}" />
    </rule>
    <rule name="CleanRouting" stopProcessing="true">
      <match url="^.*$" ignoreCase="false" />
      <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
      </conditions>
      <action type="Rewrite" url="?id={R:0}&amp;{QUERY_STRING}" appendQueryString="false" />
    </rule>
  </rules>
</rewrite>
<!-- Double escaping is needed for URLs with '+', e.g. for the account page for a username with a space. -->
<security>
  <requestFiltering allowDoubleEscaping="true" />
</security>
  </system.webServer>
</configuration>

我不太确定你想要什么 web.config,但这会给你所有的查询字符串对:

Dim item
For each item in Request.Form
    Response.Write "Name: " & item & " Value= " & Request(item)
Next