url

Form File-Upload from URL or Data-URL?

Hi! Can I use an <input type="file"> field with an (data)URL? I would need something like this in an Greasemonkey-script, but it seems impossible. Or is there some way? The only working alternative seems at the moment trying to write a proxy, which replaces the file-field with an text-field for an URL, so the proxy can download the fil...

returning a link to a named URL from a model function

Hello all, Well, it has finally happened, and I have stumbled across a problem for which no amount of googleing has helped. (Although I may simply be looking in the wrong direction, in which case, any pointers in the right direction would be great). I am trying to find a way to return a link to a named url (with variable arguments) fro...

Zend Framework url setting for Https

Hi, I have Zend Framework application and i use SSL certificate in login and signup page. I don't need "https" login and signup page other than all url. But url helper set "https" to all url at signup or login page. How to disable "https" for others url? Sorry my bad english. ...

Resolve virtual path in MVC

Hi, I got a adress like this : ~/Content/Files/AdImages/20/20_thumb.jpeg, I need this to be resolved. This was done in ASP.net with Control.ResolveUrl(). According to this article http://stephenwalther.com/blog/archive/2009/02/18/asp.net-mvc-tip-47-ndash-using-resolveurl-in-an-html.aspx, I should use somthing like this : urlHelper.Co...

How to change "+" to become "-" in Wordpress search page?

when searching kevin mccarthy, it automatically write in the URL: http://www.web.com/search/kevin+mccarthy but when I change http://www.web.com/search/kevin+mccarthy with http://www.web.com/search/kevin-mccarthy, no result appeared. I have tried modify in wp-includes/rewrite.php but dont know what to replace ...

urllib.py doesn't work with https?

In my python app I try to open a https url, but I get: File "C:\Python26\lib\urllib.py", line 215, in open_unknown raise IOError, ('url error', 'unknown url type', type) IOError: [Errno url error] unknown url type: 'https' my code: import urllib def generate_embedded_doc(doc_id): url = "https://docs.google.com/document/ub?id...

Safe Process.Start implementation for untrusted URL strings

My goal is to safely open a web page in a users default browser. The URL for this web page is considered "untrusted" (think of it as a link in a document opened with this software, but the document could be from anywhere and the links in it could be malicious) I want to avoid someone passing "C:\Windows\malicious_code.exe" off as a URL ...

Response.redirect url encodes spaces to %20 in querystrings

Hi all, When i do this: Response.Redirect("./blah.aspx?key=my value with spaces"); It sends the browser to: mysite/blah.aspx?key=my%20value%20with%20spaces Now i understand why it's doing this - for the sake of ancient browsers that would choke on the spaces. But really, what i want is to have a nice-looking url with spaces instead...

passing URL parameter using command Button in jsf portal using Jsr 168

Hi, I am not able to recieve parameter from the URl when I am calling another portlet using Command Button in Jsf in JSR 168. Actually I am calling the method of my manageBean from the Command Button where I am generatin the URL, and calling another Portlet. But I am not able to receive the parameter in my another manageBean of the C...

How can I format URLs nicely in Perl?

Hello! I have a bunch of URLs that I have to turn into links: for my $url (@url_list) { say "<a href='$url'>$url</a>"; } Is there a module for making the visible URL nicer? A bit like this: http://www.foo.com/ → www.foo.com http://www.foo.com/long_path → www.foo.com/lo… I know a simple regex will probably do here, but I’m spoi...

Prevent URL being stored to browser history

I need to open a popup window to a url with certain parameters. The parameters contain information that I would like to prevent from showing up in the browser history. The url points to a 3rd party site and I can't affect the way those parameters are transferred to them (can't use POST for example). Currently I have worked around this s...

Wrong host returned using HttpContext.Current.Request.Url.Host

Hi We have multiple domains for one of our websites. e.g. mydomain-uk.com and mydomain.co.uk I have a handler which creates an XML sitemap and it uses HttpContext.Current.Request.Url.Host to retrieve the host site. When my browser is on mydomain.co.uk/handler it retrieves mydomain-uk.com as the host How can I ensure it always retrie...

socket open to http url and retrieve a data

I would like to open a socket to http url (https://www.abc.co.uk:8433/open/url/client?username=123&amp;password=456) using socket and connect and recv methods of socket.h. The problems are that the url is using 8433 port and the remaining url (/open/url/client?username=123&password=456). Also using https url. Dose anyone know how to do...

jQuery check current url

We are on page 'http://site.com/movies/moviename/' How can we know, is there /movies/ in current url (directly after site's root)? Code should give: True for 'http://site.com/movies/moviename/' And false for 'http://site.com/person/brad-pitt/movies/' Thanks. ...

How can I find the full URL from a relative URL in Perl?

I'm new to perl but was wondering if anyone know of a script that was similar to the following PHP version which works great! private function resolve_href ( $base, $href ) { if (!$href) return $base; $rel_parsed = parse_url($href); if (array_key_exists('scheme', $rel_parsed)) return $href; $base_parsed =...

What's wrong with this url?

Why is Xul app saying XML Parsing Error: not well-formed for: <browser class="AppBar" type="content" src="test.html?img1=img1.jpg&img2=img2.jpg" flex="4"/> at the equals sign of &img2=img2.jpg"? Note that it works without the parameters. ...

Rewriting a redirected URL with mod_rewrite

Hi, Here is my setup : I have a website located at www.cabsh.org/drupal I want to use mod_rewrite to do 2 things : Redirect www.cabsh.org to http://www.cabsh.org/drupal/index.php (I got this one) Rewrite /www.cabsh.org/drupal/index.php to www.cabsh.org/site/index.php I cannot figure how to achieve the 2nd point. I'm using .htacc...

Java Servlet getParameter for a param that is a URL

I am building a site which submits a url to a servlet for analysis purposes. On the client side, I submit the url as a parameter that is encoded. For example... Submit: http://www.site.com Goes to: http://localhost/myservlet/?url=http%3A%2F%2Fwww.site.com On the server side, I have my servlet request the parameter like so... String u...

Convention for a client-side (Flash) deep link path separator?

I see examples in the SWFAddress documentation, but it's not clear what the convention should be for a multi-level path. Do their examples intend to suggest that the path separator should be a hyphen? Why not like this? http://example.com/#/deep/link/path ...

A URL that contains all valid characters to test my regex pattern?

Hello, First of all I created my own regex to find all URLs in a text, because: When I searched SO and google only found regex for specific URL constructions, like images, etc. I found a pretty complete regex from the PHP's manual itself (see "splattermania at freenet dot de 01-Oct-2009 12:01" post at http://php.net/manual/en/function...