[thelist] Help with comparing URLs

Anthony Ettinger apwebdesign at yahoo.com
Thu Oct 6 14:18:56 CDT 2005


what language? For Perl, try:

URI::URL or is it URL::URI?




--- manuel.gonzalez.noriega at gmail.com wrote:

> Hi, I've got a MySQL table of links to display
> GROUPED BY their href.
> 
> Trouble comes the URLs being subtly different,
> enough for the group
> clause to fail, but still the same.
> 
> So, when I've got:
> 
> 1. http://www.example.com/foo
> 
> 2. http://example.com/foo
> 
> 3. http://bar.example.com/foo
> 
> 4. http://bar.example.com/foo/
> 
> I want them to present "as one"
> 
> I'm leaning to add a 'canonical href' column to the
> table and run a script that
> 
> * Replaces /http:\/\/(.*)\./ with 'http://'
> * If the last character in the URL is  '/', replace
> it with ''
> 
> Is there any other better approach?
> 
> Thanks in advance for any hint.
> 
> --
> Manuel
> a veces :) a veces :(
> pero siempre trabajando duro para Simplelógica:
> apariencia,
> experiencia y comunicación en la web.
> http://simplelogica.net # (+34) 985 22 12 65
> 
> ¡Ah! y escribiendo en Logicola:
> http://logicola.simplelogica.net
> --
> 
> * * Please support the community that supports you. 
> * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip
> Harvester
> and archives of thelist go to:
> http://lists.evolt.org
> Workers of the Web, evolt !
> 


Anthony Ettinger
ph: (408) 656-2473
blog: http://www.chovy.com


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


More information about the thelist mailing list