url

Configure apache to treat static resources with "?" character in filename

Hello All, For various reasons, I have a bunch of static resources all with the following naming format: xxxxx?yyyyy where the x's are regular letter chars, and the y's numbers 0-9. Apache is truncating the filename in the GET request at the "?" - as this is traditionally used to delinate query params - and thus reporting the follow...

How do I load arbitrary data from a url PHP?

This question is simple. What function would I use in a PHP script to load data from a URL into a string? ...

Recognize URL in plain text

This should be easy, but I'm not sure how to best go about it. I have a WinForms app that lets the user type in long descriptions. Occaisionally, they would type in URLs, and the RichTextBox would recognize them and make them clickable when displayed. I'm moving the app to the web, and I'm not sure how to make those same URLs clickable....

getUrl without opening window AS2

How do you call a URL from ActionScript 2 without opening a new window ? I've tried "getUrl" and various methods of "LoadVars". ...

Changing browser's address bar without refreshing

I'm developing a web app. In it I have a section called categories that every time a user clicked one of the categories an update panel loads appropriate content. I want to after user clicked the category change the browser's address bar url from "www.mysite.com/products" to something like "www.mysite.com/products/{selectedCat}" withou...

How to get multiple parameters with same name from a URL in PHP

I have a PHP application that will on occasion have to handle URLs where more than one parameter in the URL will have the same name. Is there an easy way to retrieve all the values for a given key? PHP $_GET returns only the last value. To make this concrete, my application is an OpenURL resolver, and may get URL parameters like this: ...

Redirect to specified URL on PHP script completion?

How can I get a PHP function go to a specific website when it is done running? For example: <?php SOMETHING DONE GOTO(http://example.com/thankyou.php); ?> I know this is really simple, but I am just having a hard time finding it on the interweb! Update: I guess I should have mentioned this. I would really like the following... <...

Url rewrite with mod_jk

In a php application, I use the following rewrite rule: RewriteRule ^test-([0-9]+).html$ test.php?id=$1 After I access this by this rule: http://localhost/testphp/test-1.html I got the expected page, and the url in browser stays in the same: http://localhost/testphp/test-1.html But if I config the same rule with mod_jk: RewriteRul...

Mask urls in JSP

Related to this question: URL characters replacement in JSP with UrlRewrite I want to have masked URLs in this JSP Java EE web project. For example if I had this: http://mysite.com/products.jsp?id=42&amp;name=Programming_Book I would like to turn that URL into something more User/Google friendly like: http://mysite.com/product-Prog...

How do I retrieve a URL from a web site using Java?

I want to use HTTP GET and POST commands to retrieve URLs from a website and parse the HTML. How do I do this? ...

asp.net, url rewrite module and web.config

Hi, i'm using ASP.net with .NET 3.5 on IIS7 (Vista) with the URL Rewrite Module from Microsoft. This means, that i have a <system.webServer> <rewrite>...</rewrite> ... </system.webServer> section within the web.config, but i get a warning, that within the system.webServer the element "rewrite" is not allowed. How can i con...

Url Form Action Without ViewContext

Is it possible to get a URL from an action without knowing ViewContext (e.g., in a controller)? Something like this: LinkBuilder.BuildUrlFromExpression(ViewContext context, Expression<Action<T>> action) ...but using Controller.RouteData instead of ViewContext. I seem to have metal block on this. ...

Path.Combine for Urls?

Path.Combine is handy, is there a similiar function in the framework for Urls? I'm looking for syntax like this: Url.Combine("Http://MyUrl.com/", "/Images/Image.jpg") ...Which would return: "Http://MyUrl.com/Images/Image.jpg" ...Of course string concatenation would be fine here since the '//' would be handled intelligently by the br...

Converting a filepath to a url securely and reliably

I'm using php and I have the following code to convert an absolute path to a url. function make_url($path, $secure = false){ return (!$secure ? 'http://' : 'https://').str_replace($_SERVER['DOCUMENT_ROOT'], $_SERVER['HTTP_HOST'], $path); } My question is basically, is there a better way to do this in terms of security / reliabilit...

A clean way of generating QueryString parameters for web requests

I came across a problem in my current application that required fiddling with the query string in a base Page class (which all my pages inherit from) to solve the problem. Since some of my pages use the query string I was wondering if there is any class that provides clean and simple query string manipulation. Example of code: // What ...

Setting ajax url for jQuery in JS file using ASP.NET MVC

When doing a Ajax call to an MVC action currently I have my javascript inside the View, not inside its own JS file. It is then very easy to do this: var xhr = $.ajax({ url: '<%= Url.Action("DisplayItem","Home") %>/' + el1.siblings("input:hidden").val(), data: { ajax: "Y" }, cache: false, success: function(response) ...

Why is Apache mod_rewrite not behaving as expected

I want to redirect URLs from an old site that used raw URL requests to my new site which I have implemented in CodeIgniter. I simply want to redirect them to my index page. I also would like to get rid of "index.php" in my URLs so that my URLs can be as simple as example.com/this/that. So, this is the .htaccess file I have created: ...

ASP.Net MVC Routing URL QueryString

Is there a way to link to another View that displays search results without having to use a querystring? For example, I know that I can do the following: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Index(string txtOrderNumber) { return RedirectToAction("OrderLookup", new { controller = "Report", id = txtOrderNumber }); ...

Url for cities/regions/countries in Rails

What do you recommend for displaying URLs and handling views in Rails for cities, regions, countries? i.e: /us/ca/San-Fransisco /countries/us/regions/ca/cities/San-Fransisco Should be able to: List all countries, list all regions within country and list all cities within a region and country. Where would you put code for displaying ...

UrlEncoding Plus(+) in URL in ASP.Net

I'm encrypting and Base64 a string. Everything works great, until I retrieve the encrypted string from the QueryString collection. The Encrypted text contains a plus symbol. When I retrieve the encrypted string, where a plus once was there is now a space. As you can imagine this doesn't decrypt. I have tried both Server.HtmlEncode/HtmlD...