help-gift
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-GIFT] Avoiding "localhost" in URLs generatedbygift-add-collec


From: David Squire
Subject: Re: [help-GIFT] Avoiding "localhost" in URLs generatedbygift-add-collection.pl
Date: Wed, 18 Jul 2001 20:07:59 +1000

Wolfgang Mueller wrote:

> >
> > If you mean the command line for "configure", then I'm afraid I can't help
> > - I can't remember exactly what I did. Typing:
> >
> > gift-add-collection.pl --help
> >
> > yields:
> >
> >
> > ....
> > --url-prefix                  This URL-trunc will be prepended
> >                               to the file names generated. Default:
> >                              file:-URL to images
> >                               Current value:
> > file:/home/users/davids/XsaPattern/
> >
> > --thumbnail-url-prefix        This URL-trunc will be prepended
> >                               to the thumbnail file names generated.
> >                              file:-URL to thumbnails
> >                               Current value:
> > file:/home/users/davids/XsaPattern_thumbnails
> >
>
> I was interested in the command line of gift-add-collection.pl
> --thumbnail-url-prefix ....
>
> Could you run this with the whole command line you typed PLUS --help?

OK. The only option I gave was "--help". When that came back showing that the 
current values of "--url-prefix" and "--thumbnail-url-prefix" had "file:" in 
them, I dived into the code. There I found that the stuff which would 
substitute in the "http" URLs if public_html was in the path had "localhost" 
hard-coded into them - changing the prefixes would not change anything (I 
thought). As an example,

     # is the urlprefix in ~/public_html? create a http-url
     
$lURLPrefix=~s[^file:/home/users/davids/public_html/][http://$lHostname/~davids/];

this had "localhost" where I now have $lHostname (which is set using my new 
"--hostname" option).

It seems that I misunderstood the way you intended these prefix options to be 
used. Just above this is:

     $lURLPrefix=          $lOptions{'url-prefix'}     || $lURLPrefix     || 
"file:$lImageDirectory";

so if I had given the option "--url-prefix 
http://viper.csse.monash.edu.au/~davids/"; all would have been well. I was 
thrown off by seeing the "file:/" after typing the "--help" option when I knew 
that I was already getting "http:" style URLs. I then went looking for 
"localhost" in the code, since this was really what I wanted to fix. So, I 
would say that my "--hostname" option is unnecessary, but useful (at least for 
me).

Cheers,

David


--
Dr. David McG. Squire
Computer Science and Software Engineering, Monash University, Australia
http://www.csse.monash.edu.au/~davids/   http://viper.unige.ch/
Do/Don't want HTML mail? Let me know.








reply via email to

[Prev in Thread] Current Thread [Next in Thread]