Re: How to link to a file with ampersand in its name

Liste des GroupesRevenir à ol misc 
Sujet : Re: How to link to a file with ampersand in its name
De : robin_listas (at) *nospam* es.invalid (Carlos E.R.)
Groupes : comp.os.linux.misc
Date : 07. Sep 2024, 21:27:17
Autres entêtes
Message-ID : <l1muqkxhmk.ln2@Telcontar.valinor>
References : 1
User-Agent : Mozilla Thunderbird
On 2024-09-07 19:59, The Natural Philosopher wrote:
I have a file that has to be called U&blah.png
 I cannot find any way to direct the browser to load it
 U&ampblah.png doesnt work
U%26blah.png doesnt work
 Using php rawurlencode doesnt work. It effectively does nothing
 Any ideas?
I copied a jpg file and renamed it "U&blah.jpg"
On the command line, this works:
w3m U\&blah.jpg
This is direct loading, bypassing apache.
If I put the file in apache path, it also works.
cer@Telcontar:/srv/www/home/cer/ampersand> l
total 12
drwxr-xr-x 2 cer users 4096 Sep  7 21:00 ./
drwxr-xr-x 5 cer root  4096 Sep  7 21:07 ../
-rw-r--r-- 1 cer users 3402 Sep  7 21:00 U&blah.jpg
cer@Telcontar:/srv/www/home/cer/ampersand>
The command "w3m http://localhost/~cer/ampersand" displays the page:
Index of /~cer/ampersand
Icon  Name                    Last modified      Size  Description
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[PARENTDIR] Parent Directory                             -
[IMG] U&blah.jpg              2024-09-07 21:00  3.3K
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Apache/2.4.51 (Linux/SUSE) Server at localhost Port 80
And hitting enter on the file displays the photo it contains (it calls imagemagick, as w3m is a text mode web browser).
Then I tried with firefox, and it also works.
http://localhost/~cer/ampersand/U&blah.jpg
So, no problem!  :-)
Oh, I also added a photo with png extension, no problem.
http://localhost/~cer/ampersand/x&inesnap-20020308-195150-1.png
Did I misunderstand something?
--
Cheers, Carlos.

Date Sujet#  Auteur
7 Sep 24 * How to link to a file with ampersand in its name14The Natural Philosopher
7 Sep 24 +- Re: How to link to a file with ampersand in its name1Lew Pitcher
7 Sep 24 +* Re: How to link to a file with ampersand in its name9Andy Burns
7 Sep 24 i+* Re: How to link to a file with ampersand in its name6Lew Pitcher
7 Sep 24 ii+- Re: How to link to a file with ampersand in its name1Andy Burns
7 Sep 24 ii`* Re: How to link to a file with ampersand in its name4Lew Pitcher
8 Sep 24 ii `* Re: How to link to a file with ampersand in its name3The Natural Philosopher
8 Sep 24 ii  `* Re: How to link to a file with ampersand in its name2rbowman
8 Sep 24 ii   `- Re: How to link to a file with ampersand in its name1The Natural Philosopher
8 Sep 24 i`* Re: How to link to a file with ampersand in its name2The Natural Philosopher
8 Sep 24 i `- Re: How to link to a file with ampersand in its name1Carlos E.R.
7 Sep 24 +- Re: How to link to a file with ampersand in its name1Rich
7 Sep 24 +- Re: How to link to a file with ampersand in its name1Carlos E.R.
8 Sep 24 `- Re: How to link to a file with ampersand in its name1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal