query-string

301 Redirecting URLs based on GET variables in .htaccess

I have a few messy old URLs like... http://www.example.com/bunch.of/unneeded/crap?opendocument&part=1 http://www.example.com/bunch.of/unneeded/crap?opendocument&part=2 ...that I want to redirect to the newer, cleaner form... http://www.example.com/page.php/welcome http://www.example.com/page.php/prices I understand I can re...

How do I write an .htaccess rewrite rule to convert query strings into segmented URIs?

Is there a way to put a rewrite rule in htaccess that will convert query strings to segmented URIs? For eg. http://domain.com/controller/method/?a=1&b=2&c=3 should get rewritten as http://domain.com/controller/method/a/1/b/2/c/3 All there is to do is remove the ? and replace the &s and the =s with a /, but I'm not quite su...

How do you persist querystring values in asp.net mvc?

What is a good way to persist querystring values in asp.net mvc? If I have a url: /questions?page=2&sort=newest&items=50&showcomments=1&search=abcd On paging links I want to keep those querystring values in all the links so they persist when the user clicks on the "next page" for example (in this case the page value would change, but t...

How can I pass a QueryString parameter to Flash swf through html <object> movie parameter?

Hi!! I have a html for render Flash swf files and this has its parameter "movie" and this "movie" value is the url of the swf. And in my swf, I have a method loadXml("myXMLFile.xml") that reads a xml, get its attributes and show them in swf. So far so good... But, what I'm looking for is to pass a QueryString in the movie value, such...

How can I get FlashVars values in ActionScript 2.0?

Hi! I have to dynamically send a flashvars value from <object>/<embed>, for example "<object name="flashvars" value="test=myxml.xml"> to my swf file. And in my AS, I have this: var xmlPath:String = _level0.test; doc.load(xmlPath); So, this way I want to read several xml files (at least it's my intention!). But nothing of what I do ...

Get QueryString values with jQuery

Is there a plugin-less way of retreiving querystring values via jQuery? if so how, and if not what plugin do you recommend? ...

Redirect 301 Transfer to New Domain Output URL is Ugly

I am moving my blog to a new domain. I am trying to do this through .htaccess. While the redirect is okay - the output URL is 'ugly' example in old domain .htaccess file: redirect 301 /archives/2009/06/02/hello-world/ http://indiapoint.net/archives/2009/06/02/hello-world/ So if we click http://www.i3pep.org/archives/2009/06/02/hello...

How to filter a result set using the query string in PHP / MySQL?

I'm building an events page similar to last.fm/events The user can filter events by date, category etc, with the parameters passed in the query string My question is, what's the best way to structure your code (queries, loops) to allow for these different query types, and potentially combine them (e.g. filter by date and category) I'm...

ASP.NET MVC: url routing vs querystring

Hi, I have a page routed like /Comments/Search/3 where i search and display all the comments of the thread "3". I'm adding a sort function (by date, author etc). What is the best way to handle it? /Comments/Search/3/Sort/Author or /Comments/Search/3?sort=author ? How do I automatically handle the querystring sort=author as a parameter ...

ASP.NET MVC parsing variables wihout URL query string

Heading I want to pass some variables from one page to another but I don't want them to appear in the URL. When I use a form to post the an ActionResult it works fine. However, when I do this return RedirectToAction("Trackers",new{page = 1, orderby=desc}); I get the URL: http://examplesite.com/Trackers?page=1&amp;orderby=desc Is ...

Can I pass parameters to a client-side HTML page?

I'm not sure if I have the jargon for asking this question not being a web developer but please bear with me. I want to send parameters to a client side HTML page (just a file on a disk no web server involved). My initial attempt was to use a query string and then parse it from window.location.href but instead of the query string being ...

How can I access the entire query string in an ASP.net controller action

I know that if I have an url like XController/Action?id=1, and an action method void Action(int id) the id parameter will automatically read from the query string. But how can I access the entire query string when I don't in advance know the name of all parameters. E.g: void Action(QueryStringCollection coll) { object id = coll...

Problem passing querystring from from silverlight to http handler

I am using Silverlight 3 beta and Visual Studio 2008 SP1 for this. In the web application (Server side) I have a HTTP handlter ImageFetcher.ashx which expects an ID parameter from the query string and retrieves the data from database and writes it to output stream. This is working fine and I have tested it with a test aspx page adding a...

How to get WebResource.axd querystring in correct case?

I am getting the css files for minifying and compressing from QueryString["path"] everything works correctly for my own css files like main.css. But when I try to acess the webresource files I receive a 500 error. The parameter which comes after the webresource.axd is case sensitive and I receive it from QueryString["path"] lowercase. T...

Stored Procedure that handles 1 or 2 or 3 value ...

i am using a stored procedure to run some queries in my database. The value is taken from a query string then passed to the stored procedure. the thing is, the user may select more than 1 option that generates 3 or more query string. e.g. http://localhost.com/test.aspx?param=76&amp;param2=79 i know how to take the values from the query...

How to pass textbox value into query string in asp.net mvc

Hi guys, Yet another newbie with ASP.NET MVC! All I intend to do is for a search textbox on my page, if I type something and click search, the url to be redirected to should have the following at the end, like in stackoverflow, /search?q=searchedtext So here is what I have now, <input id="searchText" maxlength="100" type="text"...

RegEx and QueryString

Hello, i have this regex that i use with my website ^.*/([a-z0-9,-]+)/([a-z0-9,-]+)/$ My question is who i can use querystring with my regex, /about-us/contact/?l=en -> page.aspx?id=12&l=en where id=1 = /about-us/contact/ where l=en = /?l=en Hope you understand, Thanks for help :) ...

My UrlRewrite IHttpModule remove my second QueryString

Hello, I have a custom url rewriter function that works fine. But when i are going to use a second querystring on my url, that remove the second querystring. my friendly url: /gallery/view-ablum/?q=1 i the code: Page.aspx?id=22&q=1 , when i have past RewritePath(...) the remove &q=1 from my real page. I don't now who to fix this, i can...

dot in variable name...

I am passing the variable with dot in query string.Php is replacing the dot with under score. So how can i retain the variable name which is having dot in the name http://localhost/sample.php?one.txt=on&amp;two.txt=on sample.php $ret=$_REQUEST['one.txt'];//Not working ...

htaccess redirect append query string?

I have an htaccess redirect that needs to forward the query string to the new URL, but it's getting dropped after the redirect. Can someone tell me what's wrong? RewriteRule ^services/agents.*$ https://services.example.com/agents/ [R=301,L,QSA] ...