Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #96: Vendor no longer supports the product


comp / comp.os.linux.misc / How to link to a file with ampersand in its name

SubjectAuthor
* How to link to a file with ampersand in its nameThe Natural Philosopher
+- Re: How to link to a file with ampersand in its nameLew Pitcher
+* Re: How to link to a file with ampersand in its nameAndy Burns
|+* Re: How to link to a file with ampersand in its nameLew Pitcher
||+- Re: How to link to a file with ampersand in its nameAndy Burns
||`* Re: How to link to a file with ampersand in its nameLew Pitcher
|| `* Re: How to link to a file with ampersand in its nameThe Natural Philosopher
||  `* Re: How to link to a file with ampersand in its namerbowman
||   `- Re: How to link to a file with ampersand in its nameThe Natural Philosopher
|`* Re: How to link to a file with ampersand in its nameThe Natural Philosopher
| `- Re: How to link to a file with ampersand in its nameCarlos E.R.
+- Re: How to link to a file with ampersand in its nameRich
+- Re: How to link to a file with ampersand in its nameCarlos E.R.
`- Re: How to link to a file with ampersand in its nameLawrence D'Oliveiro

1
Subject: How to link to a file with ampersand in its name
From: The Natural Philosop
Newsgroups: comp.os.linux.misc
Organization: A little, after lunch
Date: Sat, 7 Sep 2024 17:59 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc
Subject: How to link to a file with ampersand in its name
Date: Sat, 7 Sep 2024 18:59:11 +0100
Organization: A little, after lunch
Lines: 16
Message-ID: <vbi49f$1f6gn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 07 Sep 2024 19:59:12 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c8ef6b3526046b48f0d49df0ba101d27";
logging-data="1546775"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/OWblEJ+/+LHQ1Twm5ZpeYdZ8zDQSdiGk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JomrPjE7DXa40HpyymKj8ZRZtmo=
Content-Language: en-GB
View all headers

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?

--
Any fool can believe in principles - and most of them do!

Subject: Re: How to link to a file with ampersand in its name
From: Lew Pitcher
Newsgroups: comp.os.linux.misc
Organization: A noiseless patient Spider
Date: Sat, 7 Sep 2024 18:08 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitcher@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sat, 7 Sep 2024 18:08:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <vbi4q1$1d7gt$1@dont-email.me>
References: <vbi49f$1f6gn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 07 Sep 2024 20:08:02 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0d39f470079b7808f69f923e97355472";
logging-data="1482269"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19K5UkFt/9iXcemxT3F3vudpF+/LIPZl98="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:1eeuO5uNH7imbJz9ogKmvvMKxYc=
View all headers

On Sat, 07 Sep 2024 18:59:11 +0100, 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?

This does not /directly/ address your issue, but....

Can you not create a filesystem (hard/soft)link to the file,
such that the (hard/soft)link /does not/ include the ampersand,
and then use /that/ filename in your html?

Something like
ln -s 'U&blah.png' U_blah.png
....
<img src="U_blah.png"/>

?

--
Lew Pitcher
"In Skills We Trust"

Subject: Re: How to link to a file with ampersand in its name
From: Andy Burns
Newsgroups: comp.os.linux.misc
Date: Sat, 7 Sep 2024 18:44 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@andyburns.uk (Andy Burns)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sat, 7 Sep 2024 19:44:30 +0100
Lines: 15
Message-ID: <lk3l8gF85pkU1@mid.individual.net>
References: <vbi49f$1f6gn$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net p8xj9TrBhHH8lCeYU784ywj50M86nV64exHcXzAPopY6p5Ht5Q
Cancel-Lock: sha1:qADyqARv8CHvXamiCteq9Yu6MCY= sha256:0AuCM8vNL65fcY0qsru1lf+G2SFjwnclsWA1Nb35B4w=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <vbi49f$1f6gn$1@dont-email.me>
View all headers

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?
http://localhost/U%26blah.txt

works here (both with IIS on win11 and apache on Fedora)

Subject: Re: How to link to a file with ampersand in its name
From: Rich
Newsgroups: comp.os.linux.misc
Organization: A noiseless patient Spider
Date: Sat, 7 Sep 2024 19:03 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sat, 7 Sep 2024 19:03:32 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <vbi824$1fvgl$1@dont-email.me>
References: <vbi49f$1f6gn$1@dont-email.me>
Injection-Date: Sat, 07 Sep 2024 21:03:32 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c1c51aaafbec25c71d28023fb1aa9a61";
logging-data="1572373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eeTGIs9ODrHOXqjCA2QUR"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:+hWBeRKPkqpZr7y135gNTDyCeos=
View all headers

The Natural Philosopher <tnp@invalid.invalid> 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

You have a syntax error above. An encoded ampersand is &amp;
The trailing semicolon is part of the encoded value.

You need U&amp;blah.png inside the src="" attribute.

Subject: Re: How to link to a file with ampersand in its name
From: Lew Pitcher
Newsgroups: comp.os.linux.misc
Organization: A noiseless patient Spider
Date: Sat, 7 Sep 2024 19:05 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitcher@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sat, 7 Sep 2024 19:05:54 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <vbi86i$1fj9h$1@dont-email.me>
References: <vbi49f$1f6gn$1@dont-email.me>
<lk3l8gF85pkU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 07 Sep 2024 21:05:54 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0d39f470079b7808f69f923e97355472";
logging-data="1559857"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18XTx0EuOm0Y4dTmLWqqQReuAUr8/gmFws="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:8B5rrWJ1H0pRoQRSUYWDONrNU+U=
View all headers

On Sat, 07 Sep 2024 19:44:30 +0100, Andy Burns wrote:

> 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?
> http://localhost/U%26blah.txt
>
> works here (both with IIS on win11 and apache on Fedora)

With test files white_grapes.png and white&grapes.png
(where white_grapes.png is a symlink to white&grapes.png)
both
<img src="white_grapes.png" />
and
<img src="white&grapes.png" />
produced proper images in Firefox, from an apache server

--
Lew Pitcher
"In Skills We Trust"

Subject: Re: How to link to a file with ampersand in its name
From: Andy Burns
Newsgroups: comp.os.linux.misc
Date: Sat, 7 Sep 2024 19:16 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@andyburns.uk (Andy Burns)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sat, 7 Sep 2024 20:16:13 +0100
Lines: 11
Message-ID: <lk3n3tF85pkU2@mid.individual.net>
References: <vbi49f$1f6gn$1@dont-email.me> <lk3l8gF85pkU1@mid.individual.net>
<vbi86i$1fj9h$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net J87C3q/OS2plLDYI8mQcUAU3MRWtd7p35qQA2LyxBQeKh3ZmDq
Cancel-Lock: sha1:IghW/rYV1hps6ypQoFMZ0CAqBh0= sha256:MpQFa4SSvUs8+POVJCn5EEqStAy7qXh2FEOvgfjUt1o=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <vbi86i$1fj9h$1@dont-email.me>
View all headers

Lew Pitcher wrote:

> both
> <img src="white_grapes.png" />
> and
> <img src="white&grapes.png" />
> produced proper images in Firefox, from an apache server
to the o/p, is the filename exactly what you think it is?

ls -b U* | hexdump -C

Subject: Re: How to link to a file with ampersand in its name
From: Carlos E.R.
Newsgroups: comp.os.linux.misc
Date: Sat, 7 Sep 2024 19:27 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sat, 7 Sep 2024 21:27:17 +0200
Lines: 72
Message-ID: <l1muqkxhmk.ln2@Telcontar.valinor>
References: <vbi49f$1f6gn$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net +CGHWm5lWC2KaLRLFKH91wC5LOefEzpQrKbodtSwD080M3u7CC
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:Mgwv91mGlV/T6t4vFSMcmTkI7O0= sha256:jch1rCnBPqYZmDT6ZxnQTw5Aa9vmFyjUARJB8ooSyyg=
User-Agent: Mozilla Thunderbird
Content-Language: es-ES, en-CA
In-Reply-To: <vbi49f$1f6gn$1@dont-email.me>
View all headers

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.

Subject: Re: How to link to a file with ampersand in its name
From: Lew Pitcher
Newsgroups: comp.os.linux.misc
Organization: A noiseless patient Spider
Date: Sat, 7 Sep 2024 19:33 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitcher@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sat, 7 Sep 2024 19:33:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <vbi9pr$1fj9h$2@dont-email.me>
References: <vbi49f$1f6gn$1@dont-email.me>
<lk3l8gF85pkU1@mid.individual.net> <vbi86i$1fj9h$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 07 Sep 2024 21:33:15 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0d39f470079b7808f69f923e97355472";
logging-data="1559857"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190w7TZX4ub5wfJpM0cE61g+BOh4hI1Fls="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:SnMvk5VDAnBcZSs7TqliWCcu/cQ=
View all headers

On Sat, 07 Sep 2024 19:05:54 +0000, Lew Pitcher wrote:

> On Sat, 07 Sep 2024 19:44:30 +0100, Andy Burns wrote:
>
>> 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?
>> http://localhost/U%26blah.txt
>>
>> works here (both with IIS on win11 and apache on Fedora)
>
> With test files white_grapes.png and white&grapes.png
> (where white_grapes.png is a symlink to white&grapes.png)
> both
> <img src="white_grapes.png" />
> and
> <img src="white&grapes.png" />
> produced proper images in Firefox, from an apache server

Also
http://host/white&grapes.png
resolves to the proper image when entered in the URL bar
of Firefox (again, image served by an apache server on Linux)

--
Lew Pitcher
"In Skills We Trust"

Subject: Re: How to link to a file with ampersand in its name
From: Lawrence D'Oliv
Newsgroups: comp.os.linux.misc
Organization: A noiseless patient Spider
Date: Sat, 7 Sep 2024 23:49 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sat, 7 Sep 2024 23:49:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <vbiopn$1j26j$16@dont-email.me>
References: <vbi49f$1f6gn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 08 Sep 2024 01:49:11 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="5b47ecd330ac087ccb2ea7289cdcbed3";
logging-data="1673427"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Q9SzBrDSkJi3zbxZf+KoG"
User-Agent: Pan/0.160 (Toresk; )
Cancel-Lock: sha1:tpsyVFjfNLs9SXi71T8tExgaqEk=
View all headers

On Sat, 7 Sep 2024 18:59:11 +0100, 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

Tried:

touch 'U&blah.png'
firefox U\&blah.png

And a Firefox tab appeared with “file:///«path»/U&blah.png” in its
address bar, and a message saying the image couldn’t be displayed
because it had errors (of course, being a zero-length file).

Or is this supposed to work through a web server?

Subject: Re: How to link to a file with ampersand in its name
From: The Natural Philosop
Newsgroups: comp.os.linux.misc
Organization: A little, after lunch
Date: Sun, 8 Sep 2024 12:45 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sun, 8 Sep 2024 13:45:57 +0100
Organization: A little, after lunch
Lines: 25
Message-ID: <vbk6a5$1u3ch$1@dont-email.me>
References: <vbi49f$1f6gn$1@dont-email.me> <lk3l8gF85pkU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 08 Sep 2024 14:45:57 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="208eaae770a6d6416df35472fb6d6586";
logging-data="2035089"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ukapO2b/fn3Mm+g5LU9mcwpzpaBYA6x4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:KBq2d4LMjvurCOcBo8ryy/yU8OQ=
Content-Language: en-GB
In-Reply-To: <lk3l8gF85pkU1@mid.individual.net>
View all headers

On 07/09/2024 19:44, Andy Burns wrote:
> 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?
> http://localhost/U%26blah.txt
>
> works here (both with IIS on win11 and apache on Fedora)

Works here too when I actually point the browser at the development
server, not the old server.
I feel a trife ashamed....

--
"It is an established fact to 97% confidence limits that left wing
conspirators see right wing conspiracies everywhere"

Subject: Re: How to link to a file with ampersand in its name
From: The Natural Philosop
Newsgroups: comp.os.linux.misc
Organization: A little, after lunch
Date: Sun, 8 Sep 2024 12:47 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sun, 8 Sep 2024 13:47:24 +0100
Organization: A little, after lunch
Lines: 43
Message-ID: <vbk6ct$1u3ch$2@dont-email.me>
References: <vbi49f$1f6gn$1@dont-email.me> <lk3l8gF85pkU1@mid.individual.net>
<vbi86i$1fj9h$1@dont-email.me> <vbi9pr$1fj9h$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 08 Sep 2024 14:47:25 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="208eaae770a6d6416df35472fb6d6586";
logging-data="2035089"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lpFxLt6fMnRY+Mepuj3ZyUwFXjWVxluA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Zd6zNfK0H9xWw2nF18EEbFQWZC4=
In-Reply-To: <vbi9pr$1fj9h$2@dont-email.me>
Content-Language: en-GB
View all headers

On 07/09/2024 20:33, Lew Pitcher wrote:
> On Sat, 07 Sep 2024 19:05:54 +0000, Lew Pitcher wrote:
>
>> On Sat, 07 Sep 2024 19:44:30 +0100, Andy Burns wrote:
>>
>>> 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?
>>> http://localhost/U%26blah.txt
>>>
>>> works here (both with IIS on win11 and apache on Fedora)
>>
>> With test files white_grapes.png and white&grapes.png
>> (where white_grapes.png is a symlink to white&grapes.png)
>> both
>> <img src="white_grapes.png" />
>> and
>> <img src="white&grapes.png" />
>> produced proper images in Firefox, from an apache server
>
> Also
> http://host/white&grapes.png
> resolves to the proper image when entered in the URL bar
> of Firefox (again, image served by an apache server on Linux)
>
>
Yeah apologies all round. I was making changes to the development server
while testing on the old server.

--
"It is an established fact to 97% confidence limits that left wing
conspirators see right wing conspiracies everywhere"

Subject: Re: How to link to a file with ampersand in its name
From: Carlos E.R.
Newsgroups: comp.os.linux.misc
Date: Sun, 8 Sep 2024 13:06 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sun, 8 Sep 2024 15:06:40 +0200
Lines: 27
Message-ID: <04k0rkx4at.ln2@Telcontar.valinor>
References: <vbi49f$1f6gn$1@dont-email.me> <lk3l8gF85pkU1@mid.individual.net>
<vbk6a5$1u3ch$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net ld5rtEbXcE4Dfmg8Al34nwF1Nsx23jrA3i20kBYONjCRZaGClJ
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:oAVXdsrJSZYzXOLpf1O+LYNwXQk= sha256:04DaqZnPAbCjy28Pqzf6dBy8k0fsRslWIUrafqqoLxs=
User-Agent: Mozilla Thunderbird
Content-Language: es-ES, en-CA
In-Reply-To: <vbk6a5$1u3ch$1@dont-email.me>
View all headers

On 2024-09-08 14:45, The Natural Philosopher wrote:
> On 07/09/2024 19:44, Andy Burns wrote:
>> 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?
>> http://localhost/U%26blah.txt
>>
>> works here (both with IIS on win11 and apache on Fedora)
>
> Works here too when I actually point the browser at the development
> server, not the old server.
> I feel a trife ashamed....

No problem -- Issue explained :-)

--
Cheers, Carlos.

Subject: Re: How to link to a file with ampersand in its name
From: rbowman
Newsgroups: comp.os.linux.misc
Date: Sun, 8 Sep 2024 17:45 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bowman@montana.com (rbowman)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: 8 Sep 2024 17:45:51 GMT
Lines: 7
Message-ID: <lk666fFk0ctU1@mid.individual.net>
References: <vbi49f$1f6gn$1@dont-email.me> <lk3l8gF85pkU1@mid.individual.net>
<vbi86i$1fj9h$1@dont-email.me> <vbi9pr$1fj9h$2@dont-email.me>
<vbk6ct$1u3ch$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net KRny+O99QBIhPxmUTIgoMgrjQ9nEMDm/UTP3Qv387/qQDBTN0T
Cancel-Lock: sha1:VmNN0R0E56ET3trXobVUMM6E3Y8= sha256:ob0prhmixYX4hOgxXlKvadZUSRU62j1HkNvZy34xfjU=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
View all headers

On Sun, 8 Sep 2024 13:47:24 +0100, The Natural Philosopher wrote:

> Yeah apologies all round. I was making changes to the development server
> while testing on the old server.

I've never, ever done anything like that :) It does tend to make you doubt
your sanity.

Subject: Re: How to link to a file with ampersand in its name
From: The Natural Philosop
Newsgroups: comp.os.linux.misc
Organization: A little, after lunch
Date: Sun, 8 Sep 2024 18:40 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc
Subject: Re: How to link to a file with ampersand in its name
Date: Sun, 8 Sep 2024 19:40:59 +0100
Organization: A little, after lunch
Lines: 19
Message-ID: <vbkr3r$211f6$6@dont-email.me>
References: <vbi49f$1f6gn$1@dont-email.me> <lk3l8gF85pkU1@mid.individual.net>
<vbi86i$1fj9h$1@dont-email.me> <vbi9pr$1fj9h$2@dont-email.me>
<vbk6ct$1u3ch$2@dont-email.me> <lk666fFk0ctU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 08 Sep 2024 20:41:00 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="208eaae770a6d6416df35472fb6d6586";
logging-data="2131430"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18sCXFqRI1Ayxc0eNFGmrPMHziZhVQtJSQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:49jjlBCiQflBEVSmO/mLsDUCsxk=
Content-Language: en-GB
In-Reply-To: <lk666fFk0ctU1@mid.individual.net>
View all headers

On 08/09/2024 18:45, rbowman wrote:
> On Sun, 8 Sep 2024 13:47:24 +0100, The Natural Philosopher wrote:
>
>> Yeah apologies all round. I was making changes to the development server
>> while testing on the old server.
>
> I've never, ever done anything like that :) It does tend to make you doubt
> your sanity.

The setup here is rather peculiar. Depending on what port (80 or 443)
you select you get a completely different server.

That isn't a long term solution, it's just how it is for development

--
In todays liberal progressive conflict-free education system, everyone
gets full Marx.

1

rocksolid light 0.9.8
clearnet tor