query-string

How can I forward a query string using htaccess?

微笑、不失礼 提交于 2019-12-10 11:09:38
问题 I am using this, at present, to rewrite URLS: RewriteEngine on RewriteRule ^([^/?\.]+)$ /page.php?name=$1 [NC] So mysite.com/home gets rewritten to mysite.com/page.php?name=home How can I make it also rewrite mysite.com/home?param=value to mysite.com/page.php?name=home&param=value ? Ideally, I'd like this to work for any name/value querystring pairs. Am I missing something obvious? 回答1: Check out the "capturing variables" section at http://corz.org/serv/tricks/htaccess2.php It says that if

Problem with slash within a query string

对着背影说爱祢 提交于 2019-12-10 10:49:58
问题 I'm using the WebRequest class to make a request to some site. The query string contains a slash (/), which cause to the url to be cut by the site, because it doesn't see it as part of the query string. The query string is: "my params / separated by slash". The request: var request = WebRequest.Create( "http://www.somesime.com/q-my+params+%2f+separated+by+slash" ); What I missing? EDIT: After all answers here are update: I was wrong about query string, it's not actually query string, but the

How to track URL redirects using Delphi and Indy?

荒凉一梦 提交于 2019-12-10 09:58:50
问题 I get several marketing emails with url links that get redirected from site to site to site. I'd like to write a program to track each URL redirect using Delphi and Indy. I'd like to traverse each URL, record the full QueryString and any Cookies that may have been set during the process. How do I do this using the Indy components that come with D2010? 回答1: First of all you need a HTTP client, which is TIdHTTP in Indy. Now you will need a data structure that will hold your results:

How do I get data from the query string in asp?

柔情痞子 提交于 2019-12-10 06:58:36
问题 I am working on a project for an IT class where I need to pass in a value on the query string in a php page and read it into a hidden field on an ASP page. I currently am passing the parameter fine from the php page to ASP, but I am pretty new to .NET in general. How do I get the data out of the string and into a variable in C#? For example, if the url is blah.com/upload?username=washington , how would I get "washington" and save it into a hidden field? Thanks a ton. Jergason Edit I knew it

Is it possible to get Dictionary from query string?

我的梦境 提交于 2019-12-10 04:19:43
问题 My controller method looks like this: public ActionResult SomeMethod(Dictionary<int, string> model) { } Is it possible to call this method and populate "model" using only query string? I mean, typing something like this: ControllerName/SomeMethod?model.0=someText&model.1=someOtherText in our browser address bar. Is it possible? EDIT: It would appear my question was misunderstood - I want to bind the query string, so that the Dictionary method parameter is populated automatically. In other

Linkedin url function

狂风中的少年 提交于 2019-12-10 02:14:11
问题 I came across a post on Quora addressing why LinkedIn uses tokens like *1_*1_*1_*1_*1_* in their url. The answer mentioned these help track where a user came from to enable a user to return to where he came from. How exactly does the URL store that type of information, and why would they use that token instead of something more conventional, such as ?last=this-page ? 回答1: Appears that those are used to carry forward and populate the form values on the left for the search page. The 1 is

Problems with UTF-8 character encoding from URL query string value in Internet Explorer 9

旧巷老猫 提交于 2019-12-10 02:08:25
问题 I'm finding an odd issue in Internet Explorer, specifically IE9, when trying to display special characters (German accented characters) provided within the URL query string. This is working as expected in Firefox and Chrome. For example, the URL I'm working with looks something like this: http://mysite.com/TestPage.aspx?Title=Hochauflösendes® I've also tried the URL encoded version of the URL: http://mysite.com/TestPage.aspx?Title=Hochaufl%C3%B6sendes%C2%AE In either case, when I'm trying to

Get querystring array values in Javascript [duplicate]

别等时光非礼了梦想. 提交于 2019-12-10 02:08:18
问题 This question already has answers here : How can I get query string values in JavaScript? (73 answers) Closed 6 years ago . I have a form that uses the get method and contains an array: http://www.example.com?name[]=hello&name[]=world I'm trying to retrieve array values 'hello' and 'world' using JavaScript or jQuery. I've had a look at similar solutions on Stack Overflow (e.g. How can I get query string values in JavaScript?) but they seem to only deal with parameters rather than arrays. Is

Can I make Django QueryDict preserve ordering?

大城市里の小女人 提交于 2019-12-09 17:06:49
问题 Is it possible to to make Django's QueryDict preserve the ordering from the original query string? >>> from django.http import QueryDict >>> q = QueryDict(u'x=foo³&y=bar(potato),z=hello world') >>> q.urlencode(safe='()') u'y=bar(potato)%2Cz%3Dhello%20world&x=foo%C2%B3' 回答1: QueryDict inherits from Django's MultiValueDict which inherits from dict which is implemented as a hash table. Thus, you can't guarantee it will stay ordered. I'm not sure if this will be relevant to what you need, but an

javascript get querystring [duplicate]

你。 提交于 2019-12-09 14:32:47
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: obtaining querystring from current url in javascript? I was to get everything after the question mark in the url. Ive seen a way to do it that does not require a function but cannot find it for the life of me. url fsdhfbsdfj/index.html?hello get hello 回答1: Use var query = window.location.search; If you want to get rid of the starting "?", use var query = window.location.search.slice(1); The properties of the