query-string

java: decoding URI query string

I need to decode a URI that contains a query string; expected input/output behavior is something like the following: abstract class URIParser { /** example input: * something?alias=pos&FirstName=Foo+A%26B%3DC&LastName=Bar */ URIParser(String input) { ... } /** should return "something" for the example input */ ...

How to use strange characters in a query string

I am using silverlight / ASP .NET and C#. What if I want to do this from silverlight for instance, // I have left out the quotes to show you literally what the characters // are that I want to use string password = vtakyoj#"5 string encodedPassword = HttpUtility.UrlEncode(encryptedPassword, Encoding.UTF8); // encoded password now = vtak...

Use modrewrite to redirect a url with querystring

I am trying to redirect an old URL that uses a query string to the new url that does not.. /tripinfo.cfm?RiverNameID=1&AdventureID=6 Now needs to go to /trips/big-ass-river/overnight.html So I am trying.. RewriteRule ^tripinfo.cfm?RiverNameID=1&AdventureID=6$ /trips/big-ass-river/overnight.html [R=301] But this is not work...

Appending a Query String to the End of a Function Action URL

Hello, For the code below, I would like to append echo $_SERVER['QUERY_STRING']; to the end of index.php. But when I try to do it, it makes the code return a blank page. So I think I might be doing it wrong. How can I correctly make this appendage? Thanks in advance, John <?php function show_loginform($disabled = false)...

asp.net dynamic sitemap with querystring? Session variable seems like overkill.

Hi, I'm using ASP.NET WebForms. I'm using the standard sitemap provider. Home > User > Account > Entry Going to the home page should have a user selection screen. Clicking on a user should list out the user's accounts with options to edit, delete, add accounts. Selecting an account should list out all the user's account's entries wit...

Extract external javascript query string/anchor value: file.js#foo=bar

http://mycloud.net/js/file.js#foo=bar I'm trying to load a cross domain javascript file, and want to pass a variable along on the query string. I have seen the above '#' method used, but am unsure of how to extract the 'foo' value from within the file.js. Any clues how to handle this without the aid of server side help? Thanks. ...

Query String in JavaScript

By using document.referrer we will get all the reference of URL in JavaScript, such as the following: http://localhost/testwordpress/wp-admin/admin.php?page=thesis-options&amp;upgraded=true From this output how can we extract the query string part only: ?page=thesis-options&upgraded=true Is there any method in JavaScript? ...

ASP.NET MVC - Adding querystring "length=" to ActionLinks?

I have a few ActionLinks that when rendered are getting a length key/value added that appears to indicate the number of characters of the controller name. How can this be removed? ...

Inserting variables into a query string - it won't work!

Basically i have a query string that when i hardcode in the catalogue value its fine. when I try adding it via a variable it just doesn't pick it up. This works: Dim WaspConnection As New SqlConnection("Data Source=JURA;Initial Catalog=WaspTrackAsset_NROI;User id=" & ConfigurationManager.AppSettings("WASPDBUserName") & ";Password='" ...

open current page in new window including query string

First of all, I am a total dud at all things related to web developement, so please bear with me here. I suspect this question is laughable for the web guys, but unfortunately I can't figure this out. Here goes: I have an application, that does some processing, writes some result files and then displays the results in an embedded IE bro...

Add querystring parameters to link_to

I'm having difficultly adding querystring parameters to link_to UrlHelper. I have an Index view, for example, that has UI elements for sorting, filtering, and pagination (via will_paginate). The will_paginate plugin manages the intra-page persistence of querystring parameters correctly. Is there an automatic mechanism to add the query...

Problem with RewriteCond %{QUERY_STRING}, backreference not dispaying in final URL

Hi, I have the following in my .htaccess file: RewriteCond %{QUERY_STRING} ^route\=product\/category\&path\=35\&page\=([0-9]+)$ RewriteRule ^index\.php$ http://%{HTTP_HOST}/product/category/35/page_$1? [R=301,L] It's not behaving as expected though, when I enter the URL: http://example.com/index.php?route=product/category&amp;path=3...

Utility to combine querystrings?

Is there a utility to combine querystrings? I'm looking for something like: Input: Combine("test=a&test2=b", "test3=c") Result: "test=a&test2=b&test3=c" Input: Combine("test=a&test2=b", "") Result: "test=a&test2=b" Input: Combine("", "test3=c") Result: "test3=c" And maybe some weird ones: Input: Combine("&test=a&test2=b", "?test3=c"...

Regex in URL Rewriting to match Querystring Parameter Values in any order?

Many URL rewriting utilities allow Regex matching. I need some URLs to be matched against a couple of main querystring parmeter values no matter what order they appear in. For example let's consider an URL having two key parameters ID= and Lang= in no specific order, and maybe some other non-key params are interspersed. An Example URL t...

Building a datagrid to show different tables depending on Request.QueryString

So, I have a control with a datagrid in it and I was wondering if depending on the value I get back from the a Request.QueryString if I could set the table name to that (that is the value being sent) and then have it build the columns? I have about 3 different tables, and they have different amounts of columns, and of course with differ...

QueryString problem in .aspx - prints out nothing

I need to print out the querystring value "?type=xxx" inside my .aspx-page, why doesn't this work: <%= Request.QueryString("type") %> While this does: <%= Request.QueryString(0) %> The first prints out nothing, the second one prints out the value as expected, but it isn't always the first value I want... Any ideas? I redirect to...

Parse string as if it were a querystring in Ruby on Rails

I have a string like this: "foo=bar&bar=foo&hello=hi" Does Ruby on Rails provide methods to parse this as if it is a querystring, so I get a hash like this: { :foo => "bar", :bar => "foo", :hello => "hi" } Or must I write it myself? EDIT Please note that the string above is not a real querystring from a URL, but rathe...

How do you create domain.com/?stringhere without a .php extension

I want to create a link like the following: http://www.myurl.com/?IDHERE What i want to be able to do is be able to goto the above link, and then pull whats after the ? (in this case IDHERE) and be able to use that information to perform a MySQL lookup and return a page. Can anyone point me into the right direction? please know this i...

Drupal destination parameter on the user account page not persistent?

If a user accesses: user/register?destination=node/add/listing And they then click on "Log In" or "Request New Password" tabs, it WONT keep the destination parameter in the address bar. I.e. After clicking on "Log in" and logging in, the user won't actually end up at: node/add/listing I thought of editing the core user module, but ...

Will Google index my site like this?

Suppose I have a URL in my query string. Someone told me that Google does not like it because they believe we are pulling content from another server. http://mydomain.com/?id=http://abc.com ...