query-string

htaccess 301 redirect rule to remove part of a query string from URLs, but leave the rest

风格不统一 提交于 2019-12-11 02:25:11
问题 I'm trying to find a redirect that will remove part of a query string from a URL, but leave the remaining query string. Now I can do this fine via a single URL redirect, but there are hundreds of these URLs. So I'm trying to find a rule that might be able to do this for all of them in one fell swoop, so I don't have to make one for each and any new ones will get redirected automatically. I'm trying to remove start=0& from the URLs, here are some examples: www.example.com/products.php?start=0

Optional query string parameter passing to WCF service

独自空忆成欢 提交于 2019-12-11 02:24:26
问题 i want to know how to use: string limit = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.QueryParameters["Limit"]; in my wcf in this method: CityNewsList GetNewsByCity(string DeviceType,string id,string limit); here 'devicetype' and 'id' are default parameter and what i want is 'limit' as optional parameter means user have a choice to pass this parameter he can pass or can not pass this. want to use limit as: if (limit == some value) { //do this. } if (limit == null) { // do

How to store data as a url parameter using javascript?

时光毁灭记忆、已成空白 提交于 2019-12-11 01:46:39
问题 I have a tabbed navigation menu and I have created hashed URLs for each tab. In one tab I have multiple information cards and a check box in the top right hand corner of each card. when this check box is checked the card's background color changes. My objective is that when the page is refreshed or sent as a link the cards that have been checked remain checked along with the changed background color. Any help would really be appreciated. 回答1: I think you need to use the combination of url

get querystring using javascript and regex

纵然是瞬间 提交于 2019-12-11 01:36:35
问题 I will have my url as this: http://mysite.com/results.aspx?s=bcs&k="Hospital" OR "Office" OR "Facility" I want to grab everything after 'k=', excluding 'k=' itself.. And this regex is partially working..but it grabs everything with k two times.. <script type="text/javascript"> document.write('<p>Showing Results for all' + window.location.href.match(/[?&]k=([^&#]+)/) || [] + '</p>'); </script> 回答1: match is returning two elements. The first is a match of the entire regex. The 2nd element is

How to use jquery query string object plugin - set, empty, remove methods not working

丶灬走出姿态 提交于 2019-12-11 00:15:06
问题 I am using this plugin: http://plugins.jquery.com/project/query-object The 'get' and 'toString' methods work fine, but the 'set', 'empty', and 'remove' methods do not work. In the author's demonstration, he only uses 'get' and 'toString', but in his example on the top of the page, he uses the rest of the "nice-to-have" methods. Anyone run into this before? Thanks. 回答1: I tried the set method, and it works just fine: alert($.query.set("section", 5).set("action", "do").toString()); Output:

Parse QueryString in SQL Server 2005

末鹿安然 提交于 2019-12-11 00:02:14
问题 Is there a simple way to parse QueryString parameters (e.g. foo=bar&temp=baz) in SQL Server? What I need in the end is a "table" with the name/value pairs. | foo | bar | | temp | baz | While it would be simple in the above example it becomes harder if the strings start to contain escaped characters (e.g. %3D) and even tougher when UTF-8 is involved. Any existing solutions? An implementation of URLDecode for SQL Server would be heaven on earth. 回答1: So to parse the query string, just use a CTE

HTTP query string and []

穿精又带淫゛_ 提交于 2019-12-10 22:33:17
问题 PHP uses [] in query parameter names to ensure that multiple occurrences of a parameter are all present in $_GET superglobal variable. (Otherwise only last occurrence is present.) (Any other software does that?) But from RFC 3986 (and others as well) it seems that neither [ nor ] are allowed in query string. Yet my experiments with various browsers suggested that no browser encodes those characters and they are there in the URI just like that... Is this real life practice? Or am I testing it

Concrete5: Can I use $_GET variable for query string on Regular Page?

痞子三分冷 提交于 2019-12-10 18:07:16
问题 How does $_GET Variable works with Concrete5? Can I use that on regular page? I know I can do this with single page via url segment, I'm just wondering if it is possible with regular page. Example is :http://www.domain_name.com/about-us/?name=test... 回答1: Get-parameters are available via the controllers. In the view of a page or block use: $this->controller->get("parameterName"); A cleaner way for custom parameters would be to define them in the function view() of the page controller. If at

Setting a query string from Java's Desktop.getDesktop().browse(URI uri);

有些话、适合烂在心里 提交于 2019-12-10 17:35:51
问题 I have tried googling but I cannot find an answer. I am writing a pure Java Desktop application. The help system launches by using the Desktop class browse function and giving it a URI. When I add a "? then the URI fails in Java. I want to pass the program version number to my offline help page in the browser, but I cannot figure out how to set a query string. I am running on RedHat 6. I am using this code: uri = new URI("file", "", programPath, "version=1.0.3", ""); Desktop.getDesktop()

Is it possible to get values from query string with same name?

自闭症网瘾萝莉.ら 提交于 2019-12-10 17:18:17
问题 I want to know if it's possible to get values from this query string? '?agencyID=1&agencyID=2&agencyID=3' Why I have to use a query string like this? I have a form with 10 check boxes. my user should send me ID of news agencies which he/she is interested in. so to query string contains of multiple values with the same name. total count of news agencies are variable and they are loaded from database. I'm using Python Tornado to parse query strings. 回答1: Reading the tornado docs, this seems to