query-string

Regex for URL with query string

喜欢而已 提交于 2021-02-04 18:50:06
问题 I'm trying to create a regular expression to use as a rule in fiddler. I'm not very good at regular expressions. This regular expression: http://myServer:28020/MyService/ItemWebService.json?([a-zA-Z]+) Matches the URL below: http://myServer:28020/MyService/ItemWebService.json?action=keywordSearch&username=StockOnHandPortlet&sessionId=2H7Rr9kCWPgIZfrxQiDHKp0&keywords=blue&itemStatus=A So far so good. But why when I try this regular expression: http://myServer:28020/MyService/ItemWebService

Parsing the url querystring using jquery and inserting the value in a textbox?

守給你的承諾、 提交于 2021-01-29 14:21:28
问题 post.php?replyto=username&othervariable=value For example, if I click a link with this url, then I want to take the replyto=username value and insert the value in a textbox using jquery. function insertParamIntoField(url, param, field) { var anchor = document.createElement('a'), query; anchor.value = url; query = anchor.query.split('&'); for(var i = 0, kv; i < query.length; i++) { kv = query[i].split('=', 2); if (kv[0] == param) { field.value = kv[1]; return; } } } $("a .reply").click

node.js http set request parameters

半腔热情 提交于 2021-01-28 01:59:10
问题 I have a node.js application and I want to call a REST api by using http.request. This is my code: http = require("http"); const options = { host: localhost, port: 8103, path: "/rest/getUser?userId=12345", method: "GET" }; http.request(options, function(res) { res.setEncoding('utf8'); res.on('data', function (chunk) { console.log('BODY: ' + chunk); resolve(JSON.parse(chunk)); }); }).end(); The above code works fine, but I don't want to include the request parameter ?userId=12345 in the path.

Changing query string key name with htaccess rewrite rule

烈酒焚心 提交于 2021-01-20 13:15:09
问题 We are changing affiliate software and I can't figure out how to rewrite the name of the query string key to achieve the following: https://www.example.com/path/to/productx?old_key_name=numeric_value Redirect to: https://www.example.com/path/to/productx?new_key_name=numeric_value So far I have: RewriteCond %{QUERY_STRING} ^old_key_name=([0-9]+) RewriteRule ^ %{REQUEST_URI}?new_key_name=%1 [L,R=301] Which doesn't retain the full path to the product, but results in: https://www.example.com

Apache, LocationMatch: match query string

為{幸葍}努か 提交于 2021-01-02 07:21:51
问题 How can I match a query string using LocationMatch with apache? <LocationMatch "/index.php\?a=b.*"> // ... ... won't work unfortunately. 回答1: Looks like you can't include query strings in Location / LocationMatch . From the Apache Docs: For all origin (non-proxy) requests, the URL to be matched is a URL-path of the form /path/. No scheme, hostname, port, or query string may be included . For proxy requests, the URL to be matched is of the form scheme://servername/path, and you must include

Apache, LocationMatch: match query string

我是研究僧i 提交于 2021-01-02 07:21:39
问题 How can I match a query string using LocationMatch with apache? <LocationMatch "/index.php\?a=b.*"> // ... ... won't work unfortunately. 回答1: Looks like you can't include query strings in Location / LocationMatch . From the Apache Docs: For all origin (non-proxy) requests, the URL to be matched is a URL-path of the form /path/. No scheme, hostname, port, or query string may be included . For proxy requests, the URL to be matched is of the form scheme://servername/path, and you must include

Querystring Issue on C# with special characters

南楼画角 提交于 2020-12-10 00:32:26
问题 I came across a very weird issue where in my querystirng had "++" as part of the text. but when i assign the query stirng value to a string ++ will become two spaces. How do i get exactly what is being passed as querystring? I observed that the querystirng collection had "++" but when I do Request.QueryString["search"].ToString() "++" gone, I checked in Immediate window. I use C# 2.0 URL: /default.aspx?search=test++ string t = Request.QueryString["search"].ToString(); 回答1: A plus sign in a

Querystring Issue on C# with special characters

流过昼夜 提交于 2020-12-10 00:24:12
问题 I came across a very weird issue where in my querystirng had "++" as part of the text. but when i assign the query stirng value to a string ++ will become two spaces. How do i get exactly what is being passed as querystring? I observed that the querystirng collection had "++" but when I do Request.QueryString["search"].ToString() "++" gone, I checked in Immediate window. I use C# 2.0 URL: /default.aspx?search=test++ string t = Request.QueryString["search"].ToString(); 回答1: A plus sign in a

Querystring Issue on C# with special characters

江枫思渺然 提交于 2020-12-10 00:22:44
问题 I came across a very weird issue where in my querystirng had "++" as part of the text. but when i assign the query stirng value to a string ++ will become two spaces. How do i get exactly what is being passed as querystring? I observed that the querystirng collection had "++" but when I do Request.QueryString["search"].ToString() "++" gone, I checked in Immediate window. I use C# 2.0 URL: /default.aspx?search=test++ string t = Request.QueryString["search"].ToString(); 回答1: A plus sign in a

Querystring Issue on C# with special characters

对着背影说爱祢 提交于 2020-12-10 00:22:22
问题 I came across a very weird issue where in my querystirng had "++" as part of the text. but when i assign the query stirng value to a string ++ will become two spaces. How do i get exactly what is being passed as querystring? I observed that the querystirng collection had "++" but when I do Request.QueryString["search"].ToString() "++" gone, I checked in Immediate window. I use C# 2.0 URL: /default.aspx?search=test++ string t = Request.QueryString["search"].ToString(); 回答1: A plus sign in a