query-string

.htaccess redirect one domain to another incliuding specific query string

和自甴很熟 提交于 2019-12-11 07:04:01
问题 basally I need to redirect http://www.old-domain.com/news.php?NewsID=30888 to http://www.new-domain.com/news.php?NewsID=30888 using htaccess however only if the query string is as above. Any other query str ings I need to continue to go to http://www.old-domain.com/news.php?NewsID=whatever_querystring. So I need to match the 30888 and then redirect to a whole new site including the news.php?NewsID=30888 . Thanks in advance 回答1: Put this code in your .htaccess and try; Options +FollowSymlinks

How to send long query string in Windows Phone with HttpWebRequest

别等时光非礼了梦想. 提交于 2019-12-11 06:33:27
问题 I am making an API call to Facebook, using the Facebook C# SDK, and I can't seem to send long query strings via HTTP GET. I need a long FQL query (select .. from .. where .. in ) to execute and I can't seem to send it. If the query is smaller, it does send successfully and return the results. Unfortunatelly, as FQL supports GET and not POST, I am stuck to GET. How can I increase the default query string limit in Windows Phone HttpWebRequest? I am using Windows Phone SDK 7.1, but testing on

URI Mapper with query string doesn't seem to work

☆樱花仙子☆ 提交于 2019-12-11 05:29:25
问题 I'm attempting to set up a URI mapper so that in the end, I can pass a query string to the xaml page I am loading. Here's what I have defined in the XAML. <navigation:Frame.UriMapper> <uriMapper:UriMapper> <uriMapper:UriMapping Uri="RequirementOverview/{id}" MappedUri="/View/Pages/RequirementOverview.xaml?id={id}" /> <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/View/Pages/{pageName}.xaml"/> </uriMapper:UriMapper> </navigation:Frame.UriMapper> My Intention is that if you click on a link

Versioning a JavaScript single page web app? (querystring)

谁说我不能喝 提交于 2019-12-11 05:02:24
问题 I have a Single Page App with some static routes such as: example.org/#!/tools/ example.org/#!/stories/story-1/ These are examples of routes that don't need any versioning. Either the "page" exists, it has been redirected or it is non-existent. But then I have other resources I'd like to version (because they can have internal states - denoted with a querystring of > 10 parameters): example.org/#!/tools/population-tool/ + ?a=b&c=d[...] Because the querystring paramaters might change over time

jquery $.post second argument. - json or query string?

隐身守侯 提交于 2019-12-11 04:06:15
问题 $.post('somescript.php', { data: $('#myInputField').val() }, function(replyData) { 1) Is the second argument of this $.post method - in json? OR 2) Is the second argument of this $.post method a query string? Thanks in advance, MEM Note: If this question doesn't make sense, please, knowing why (it doesn't make sense) may also help and, be taken as an valid answer as well. 回答1: In general both ways are in practice very close . The function $.post or $.ajax will encode the data posted in the

How to combine query strings in PHP

99封情书 提交于 2019-12-11 03:50:15
问题 Given a url, and a query string, how can I get the url resulting from the combination of the query string with the url? I'm looking for functionality similar to .htaccess's qsa . I realize this would be fairly trivial to implement completely by hand, however are there built-in functions that deal with query strings which could either simplify or completely solve this? Example input/result sets: Url="http://www.example.com/index.php/page?a=1" QS ="?b=2" Result="http://www.example.com/index.php

Why does Request.QueryString[“path”] converts all + signs to spaces?

大城市里の小女人 提交于 2019-12-11 03:09:55
问题 I have a javascript code like this : function OnRequestComplete(result) { // Download the file //Tell browser to open file directly alert(result); var requestImage = "Handler.ashx?path=" + result; document.location = requestImage; } and Handler.ashx code is like this : public void ProcessRequest(HttpContext context) { Context = context; string filePath = context.Request.QueryString["path"]; filePath = context.Server.MapPath(filePath); } In filePath we don't have any + signs (spaces instead).

Should I be using OAuth to pass data across servers, from JavaScript to C#?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 02:56:26
问题 I have a requirement to pass data from JavaScript running in a private/secure environment (i.e. not public) to an ASP.NET page on a public website. The method I'm currently trying is this (roughly): Javascript (inc. sha256.js): var key = "myVeryLongAndUnguessableKey&#^@23981238#&#&!*"; var nonce = "<randomly generated value>"; var expiry = new Date().getTime(); var data_to_pass = "name1=value1&name2=value2&name3=value3"; var concatStr = key + nonce + expiry + data_to_pass; var hashed = sha256

How do I keep Google Analytics from corrupting query strings that contain %26?

感情迁移 提交于 2019-12-11 02:45:13
问题 I have many links on my site that have query strings that contain %26 (which is a URL-encoded ampersand). For example: ?action=keyword_results&f=company&q=Bausch+%26+Lomb+Canada+Inc. Apparently, Google Analytics is prematurely decoding the query string and it treats the text after the %26 as a separate parameter. I use the Exclude URL Query Parameters option to exclude most query parameters (including action, f, and q) from our results. But I am getting stats for hundreds of pages with query

Get URL Query String Parameters when there are multiple parameters with the same name using Jquery or JS

笑着哭i 提交于 2019-12-11 02:26:16
问题 I have a URL that is comprised of multiple filters that are named and have corresponding search criteria, I cannot change the way these urls are constructed. I am aware of how to get query string parameters in a scenario where I am just trying to get the value of one parameter, however I can't seem to figure out how to associate them together appropriately. For example here is the url: /AllItems.aspx?FilterName=FilterA&FilterMultiValue=*FilterASearchValue*&FilterName=FilterB&FilterMultiValue=