Forum Moderators: phranque

Message Too Old, No Replies

appearance of :80 in url

The :80 is automatically appearing in an url agaisnt my wishes.

         

4thePegeh

5:30 pm on May 18, 2007 (gmt 0)

10+ Year Member




Hi

One of my files uses

<!--#include virtual="mmm.html" -->

to include a file containing the following code:

<p>1. Copy this link: <a href="http://www.domain.com<!--#echo var="DOCUMENT_URI" -->">Check out this page: <!--#echo var="DOCUMENT_NAME" --></a></p>

Visitors are encouraged to paste the above included code into their e-mail clients and send to friends.

When I copy it into my e-mail client and send to another e-mail address and open it up and hover over the link, the link correctly shows as

"http://www.domain.com/dir/xyz.html"

but when I click on the link, it opens my browser to:

"http://www.domain.com:80/dir/xyz.html"

The ":80" concerns me.

If I then put my curser in the address box, and click return, the address box url changes to
"http://www.domain.com/dir/xyz.html"

How to I prevent it from adding the :80?

As I recall it did not add the :80 when the code was on the original page rather than the included page.

jdMorgan

8:49 pm on May 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Port 80 is the default HTTP port, which is why it's appearing in DOCUMENT_URI. That's also why your browser removes it, since it (the browser) knows it's going to use port 80 anyway.

You could try using the REQUEST_URI variable instead.

Jim

4thePegeh

5:10 pm on May 31, 2007 (gmt 0)

10+ Year Member



Hi

Thanks for the suggestion.

For some reason my system still adds the :80 in the browser url bar when I click the link in the e-mail. Even though the link in the e-mail appears not to contain the :80.

I just realized that the same thing happens when I cut and paste

[domain.com...] from the browser url bar into an e-mail and send it. When I open it, even though the url in the e-mail shows without the :80, when I click on the link the :80 appears in the browser url bar.

It looks like I was also mistaken when I wrote that it did not happen when the code was in the original url rather than in a file called by ssi.

I guess if having the :80 show up doesn't cause any security concerns, I will just leave it.

Do you think that if I later move to a dedicated rather than shared server, will it may break the link?

jdMorgan

12:17 am on Jun 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This sounds like a server configuration problem. Dis you add any code that does redirects of any kind? Be especially aware of code intended to force certain URLs to HTTPS (SSL) and other URLs to HTTP (non-SSL); This code, if improperly-written, can cause the problem you describe.

First step: Ask your host.

Jim