Why does Outlook insert '/?' in hyperlink text containing a '?'?

K

karlos_t_jackal

Hi!

1. I create text that I wish to format as a hyperlink in Outlook
2. Text has the following form: THIS IS A HYPERLINK
3. I select the text and then select Insert --> Hyperlink
4. Outlook provides the Insert Hyperlink dialog box
5. I enter "http://abc?abcData=1234567890
6. I click "OK"
7. The text is formatted as a hyperlink, complete with blue line
8. When the mouse hovers over the link, I see the following:

http://abc/?abcData=1234567890
Ctrl + click to follow link

9. This is not what I entered. Outlook has replaced the '?' with '/?' and
this will destroy the actual hyperlink when used in a browser.

I am looking for someone to

(a) explain why this happens
(b) explain how to get Outlook to stop doing this (since it seems rather,
well, not particularly intelligent to arbitrarily replace ? with /?)

Cheers,

karl
 
R

Roady [MVP]

IIRC; the RFC 2616 states that when the absolute path for a Request-URI is
empty, its root must be specified with a /
So it is not arbitrary behavior of Outlook; it is following standards.
 
V

VanguardLH

karlos_t_jackal said:
Hi!

1. I create text that I wish to format as a hyperlink in Outlook
2. Text has the following form: THIS IS A HYPERLINK
3. I select the text and then select Insert --> Hyperlink
4. Outlook provides the Insert Hyperlink dialog box
5. I enter "http://abc?abcData=1234567890

Not valid HTTP URL syntax.
6. I click "OK"
7. The text is formatted as a hyperlink, complete with blue line
8. When the mouse hovers over the link, I see the following:

http://abc/?abcData=1234567890
Ctrl + click to follow link

That is only valid HTTP URL syntax *if* the recipient is in the same
intranet as yourself and uses the same DNS completion to find a host
that is only identified by the "abc" hostname (i.e., the domain has to
be added by your TCP/IP config).
9. This is not what I entered. Outlook has replaced the '?' with '/?' and
this will destroy the actual hyperlink when used in a browser.

Because what you show in #5 is not a valid URL. The question mark
delimits the parameters in the *path* portion of the URL, and that is
/AFTER/ the host has been specified. You are also not identifying to
which page the data for the parameters are transmitted so the assumption
is that index.html (or whatever the server designates as the default
"home" page) will accept that data.

http://<host>/<path>?<parameters>

See why the slash got added? You use the question mark which delimits
the parameters from the path but both path and parameters are AFTER the
domain section in the URL. You didn't bother to delimit the host from
the path so something had to be assumed about the string before the
question mark that delimits the parameters, so the assumption made was
the string before the question mark was a hostname (and not a fully
qualified hostname, too).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top