[英]How to get all request.querystring one by one
This is my code and in this code i got request.querystring("id") eg. 这是我的代码,在此代码中,我得到了request.querystring(“ id”)例如。 www.site.com/q
www.site.com/q
but i need all request.querystring by separate name eg. 但是我需要通过单独的名称,例如所有的request.querystring。 www.site.com/q1/q2/q3/q4
www.site.com/q1/q2/q3/q4
how do i set all request.querystring name and got data via this we.config ? 我如何设置所有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}&{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>
I'm not quite sure what you want in the web.config, but this will get you all of the querystring pairs: 我不太确定您要在web.config中使用什么,但这将为您提供所有的查询字符串对:
Dim item
For each item in Request.Form
Response.Write "Name: " & item & " Value= " & Request(item)
Next
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.