url

Regex to validate URL - Not checking for HTTP?

I know there are tonns of questions on here to validate a web address with something like this /^[a-zA-Z]+[:\/\/]+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_]+$/i The only problem is, not everybody uses the http:// or whatever comes before so i wanted to find a way to use the preg_match() but not checking for http as a must have but mor...

Django: Dynamic URL alias in templates

I am trying to use a template that contains a link such as this: <a href="{% url search query,page.previous_page_number %}">previous</a> I am trying to use it in multiple contexts; in other words, the URL alias "search" needs to point to a different target, depending on the view that renders the template. Is there a way to pass such ...

Hide link URL with JavaScript

How do I hide a URL? The URL is a mouse over an image. I want to hide the URL for the image when the user mouse over the image. Right now when I mouse over the image, I can clearly see the URL on the status bar, not the location bar. echo'<a href="images/myImage-'.$i.'.jpg?day='.$i.'" onclick="swap(this); change(this); return false;">';...

URL redirection problem

i have the below url http://bit.ly/cDdh1c When you place the above url in a browser and hit enter it will redirect to the below url http://www.kennystopproducts.info/Top/?hop=arnishad But where as when i try to find the base url (after eliminating all the redirect urls) for the same above url http://bit.ly/cDdh1c via a python prog...

URLDownloadToFile API, how can it be used asynchronously?

How can this API URLDownloadToFile be used asynchronously? I need to show the progress of the download via SendMessage to a client window, which can't be done as the API appears to be synchronous and it never sends the OnProgress until the download completes. I have also seen some example codes involving IMoniker interface, but I can't f...

Why does a link with "@" work in my browser but C# HttpWebRequest gives 404 (The remote server returned an error: (405) Method Not Allowed.)

Hi, Anyone have an idea offhand regarding why a link with an "@" in it works on my browser, but when I go to get this particular link in my HttpWebRequest code I get a 405 error? The remote server returned an error: (405) Method Not Allowed. The example link in question: http://internal_link/@api/deki/site/logo.png thanks ...

URL design: http://domain/app/document123/edit or http://domain/app/edit/document123?

Let's say I have an app and in that app I need to view and edit "documents". I was thinking of this URL design. To pull up the default view of document with the ID "x123": http://domain/app/document-x123 To edit the same document: http://domain/app/document-x123/edit Delete http://domain/app/document-x123/delete This is more from...

Search engine friendly URLs that contain numbers... good or bad?

I made a website that has a hierarchical structure and has search engine friendly (SEF) URLs like: /seeds-1/ /seeds-1/fruits-2/ /seeds-1/fruits-2/black-berries-5/ /seeds-1/fruits-2/blue-berries-6/ /seeds-1/fruits-2/strawberries-7/ /seeds-1/vegetables-3/ /seeds-1/vegetables-3/potato-8/ /seeds-1/vegetables-3/onion-9/ /seeds-1/vegetables-3...

php convert all links to absolute urls

I am writing a website crawler in php and I already have code that can extract all links from a site. A problem: sites use a combination of absolute and relative urls. Examples (http replaced with hxxp as I can't post hyperlinks): hxxp://site.com/ site.com site.com/index.php hxxp://site.com/hello/index.php /hello/index.php hxxp://...

username in url with rails routes

Hello, I'm not exactly sure how to frame this question so I'll just go for it. I am recently returning to rails after a hiatus and I am building a social networking style application. Basically I'd like to do what twitter does and have each persons profile page be found at "http://www.url.com/username" and while I have managed to get th...

Regex mid-string pattern exclustion

I need help with a regular expression for use with UrlRewriting.Net. I have two URLs - http://domain/SomeFolder/tracks/SomeFileName/ and http://domain/SomeFolder/&lt;could be anything>/SomeFileName/ For URL rewriting purposes I need to come up with one expression that will let me target specifically the URL with "tracks" in the mid...

How can java applet be used to mask divx source (with example)?

For example look at ninjavideo's divx player source. It is this: src="http://127.0.0.1:64651/nv/47244" How do they use the java applet to output the src as a divx readable file? Source: http://beta.ninjavideo.net/video/47244 Warning: You will need to allow java applet ...

how to read the parameters and value from the querystring using java

Hi, I am using Ciui from google code and all the requests are only GET requests and not POST. The calls are made by the ajax (i am not sure) . I need to know how to read the "searchstring" parameter from this url. When i read this in my servlet using the getQueryString() method i am not able to properly form the actual text. This unicod...

Google fusion tables api url encoding

This example code and more specific the runUpdate(String updateQuery) function is not working with non-english characters in the updateQuery. After the execution of this query i see in my fusion tables question marks where non-english chars should be. Any ideas? Thank you ...

How can I have Code Igniter URI segments for multiple variables?

I'm writing an app that allows you to filter database results based on Location and Category. If someone was to search for Liverpool under the Golf category the URI would be /index.php/search/Liverpool/Golf. Should someone want to search by Location but not category, they would be sent to /index.php/search/Liverpool However, should so...

Mapping of URLs to Azure WebRoles.

I cannot find any high level discussion docs that describe how URLs are mapped to Azure WebRoles in the case where an application has multiple WebRoles. Is it: roleA.myApp.com to WebRoleA roleB.myApp.com to WebRoleB or: www.myApp.com/roleA to WebRoleA www.myApp.com/roleB to WebRoleB The answer to this question will help me decide ...

Versioning in Web Service and override the WSDL URL from Webservice Name.

One of our webservice has been implemented with version attribute in the wsdl.(wsdl having two ports in a single service). This is currently running fine in the RA2 LWJ environment. We are in the process of migrating from RA2.0 (LWJ with Sun application Server) to RA3.0 (WAS). In Sun application server, sun-jaxws.xml and web.xml were us...

Port in the URL

Hi, I've got a web app that I deploy to several applications like so- https://customerinternaldomain.com/thewebapp There are a lot links that pop open windows. In the past I was using the following to determine the url of the window to pop. string appPath = this.Request.ApplicationPath; if ( !appPath.EndsWith ( "/" ) ) ...

How do I url unencode in Python?

GIven this: It%27s%20me%21 Unencode it and turn it into regular text? ...

Regex to match all URLs except certain URLs

I need to match all valid URLs except: http://www.w3.org http://w3.org/foo http://www.tempuri.org/foo Generally, all URLs except certain domains. Here is what I have so far: https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)? will match URLs that are close enough to my needs (but in no way all valid URLs!) (thanks, h...