url

given 2 urls, how to tell that they are actually referring to the same website or webpage?

i am using Php. given 2 urls like this, http://soccernet.com and http://soccernet.espn.go.com/index?cc=4716 how to tell that they are actually the same? also consider situation where the difference is the httpS, like https://gmail.com and http://gmail.com please advise. I am finding it a struggle at using regex because sometimes it ...

iPhone file extension app association

Hello everybody! On my iPhone, I'm running an app called Caissa Chess. After registering the app with the manufacturer (this is optional) I received an email, containing a chess puzzle. The crucial part of the mail message, showing a chess diagram looks like this: <a href="chess://puzzle/8/p1R3p1/4p1kn/3p3N/3Pr2P/6P1/PP3K2/8 w ?term=w2...

bit.ly - API Stat Tracking

Hello, I am not sure if this is the correct forum for this question, but I'm not sure where else to ask it. bit.ly provides stats for links that are generated through their site. However, it does not seem to create stats for links generated through their API. Can someone tell if me there is a way to see the stats associated with a li...

Hide index.php (or index.html) of an URL

When I type the address of my site in a browser (mysite.com), it redirects to mysite.com/index.php. Why not to index.html ? Because I changed it in the conf file in Apache 2.2 . Now I would like to hide the last "index.php" part. How do I do that ? Would it be different it was index.html than index.php ? Wouldn't be ugly if by lookin...

What is apache's maximum url length?

What is the maximum length of a URL in apache? Where is it documented, and is it configurable? I'm implementing an openid identity provider, and would like to know the limitations I'm up against. I know about the 2048 byte path limit on Internet Explorer. That can be handled specially using user agent detection. Other browsers have much...

Is there a simple JavaScript way to manipulate arbitrary URLs?

Is there a way to easily handle manipulating URLs in JavaScript? A bit of context: I want to use ThickBox, the popular jQuery modal popup box, but unobtrusively. According to the ThickBox documentation I have to give all links that I want to be made modal a CSS class of "thickbox" and change the URL from... http://www.mysite.com/mypop...

HttpContext.Current.Request.Url.Host returns a string of numbers

I have a website that emails a link to the invoice when an order is complete. The link should be http://mysite.com/QuoteAndBook/Confirmation?orderId=123 But for some reason it is: http://204435-204435/QuoteAndBook/Confirmation?orderId=123 The host portion of the link is generated using HttpContext.Current.Request.Url.Host but I woul...

How do I go about abstracting URLs?

URL abstraction: www.domain.com/perl.pl to www.domain.com/perl I am reading MIT's Software Engineering for Internet Applications (specifically, http://philip.greenspun.com/seia/basics ) and the author, Philip Greenspun, mentions URL abstraction but doesn't seem to go into any of the details of actually implementing it. I'm running Debi...

c# function, validate url within mvc app

I'm trying to build a function within my mvc app that will validate the user's url input. in my code below, i get the "not all code paths return a value." I need help figuring out why it doesn't like when i return result. thanks! public static long InsertUrl(string inputUrl) { long result = 0; if (!string...

II7 Rewrite Issues - excluding pages

Hey all, I've got a question about IIS7 rewrite. I'm wondering if there is a way to set conditions for re writing urls. I'm wanting to rewrite: http://www.domain.com/user.aspx?id=username to become http://www.domain.com/username/ I also have http://www.domain.com/article.aspx http:...

How to verify a given string is a real URL, in PHP?

I need to find the best way (in terms of performance) to find if a given string is a URL. REGEXP won't help, as www.eeeeeeeeeeeeeee.bbbbbbbbbbbbbbbb.com is a valid url name but not in any network known to man. I am thinking using CURL and see if I get status 200 back or just file_get_contents and analyze the result. Is there a better way...

How can I convert a URL query string into a list of tuples using Python?

I am struggling to convert a url to a nested tuple. # Convert this string str = 'http://somesite.com/?foo=bar&amp;key=val' # to a tuple like this: [(u'foo', u'bar'), (u'key', u'val')] I assume I need to be doing something like: url = 'http://somesite.com/?foo=bar&amp;key=val' url = url.split('?') get = () for param in url[1].spl...

url validation using javascript

Hi, I want to validate url and want to display message. Below is my code. $("#pageUrl").keydown(function(){ $(".status").show(); var url = $("#pageUrl").val(); if(isValidURL(url)){ $.ajax({ type: "POST", url: "demo.php", data: "pageUrl="+ url, success: function(msg){ if(msg == 1 ){ ...

Why would Google Search use client-side URL parameters?

Yesterday morning I noticed Google Search was using hash parameters: http://www.google.com/#q=Client-side+URL+parameters which seems to be the same as the more usual search (with search?q=Client-side+URL+parameters). (It seems they are no longer using it by default when doing a search using their form.) Why would they do that? Mor...

mod_rewrite ecommerce URL design

I have problems with how I should structure my product listing pages, products pages, webpages. It roughly translate into this: /bags/nicebag.html = /product.php?product=nicebag&category=bags /nicebag.html = /product.php?product=nice_bag /bags = productlisting.php?&category=bags Problem is that webpages will share same URL structure...

as3 Flex make urls from text clickable

In an AIR app, I am loading a bunch of arbitrary text via JSON, loading it into an object, and displaying it via a custom renderer. I would like to have urls be clickable. So I'm sure that this is possible via some crazy regex thing (as I found for php here), but, Flex being flex, I'm astonished that there isn't some builtin functionali...

I know that java.net.URL tries to resolve the URL; does java.net.URI do the same?

A quick Google didn't turn up a definitive answer. If URI does do this, is there a widespread third-party library that won't do this? I just need some parsing, and I can't have unpredictable delays while the constructor attempts to resolve a URI? Thanks. ...

How do I programmatically request a URL in ASP.NET?

I would like the server to call a URL (an ashx page) programmatically and store the response as a string. Using HttpWebRequest doesn't seem like it will work properly because I do not want to redirect the client there. Thanks. ...

How to catch 404 error in urllib.urlretrieve

Background: I am using urllib.urlretrieve, as opposed to any other function in the urllib* modules, because of the hook function support (see reporthook below) .. which is used to display a textual progress bar. This is Python >=2.6. >>> urllib.urlretrieve(url[, filename[, reporthook[, data]]]) However, urlretrieve is so dumb that it ...

Block all urls on windows desktop using win32 API

Hello, I am trying to develop one application which can block all urls using win32 api on windows desktop application. So is there any api or any procedure doing programmatically so that i can block all urls? ...