Re: Website using port 85

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

 



On Sat, 29 Jan 2005 02:40:18 -0500, Steven J. Brown
<sbrown3@xxxxxxxxxxxxx> wrote:
> Forwarding is actually to http://69.113.88.148:85/mia.  Perhaps I should
> redirect to the /mia subdirectory.  Now my firewall forwards port 443 to
> 85, so I can access the site from work using
> http://69.113.88.148:443/mia/ (for some reason, if I don't use a
> trailing forward slash, it times out).

The reason you need the trailing slash is because the web standards
say it's mandatory.  The "mia" part is actually a directory name on your
webserver.  And so relative URL syntax works properly (for instance
"." and ".."), the trailing slash is necessary.

Apache is designed to automatically send a redirect back to the
browser if it sees a request URL without the slash when it should
have one.  Normally this redirect is completely invisible.  You can
actually see the redirect:

  $ curl --head http://69.113.88.148:85/mia
  HTTP/1.1 301 Moved Permanently
  Date: Sat, 29 Jan 2005 08:43:56 GMT
  Server: Apache/2.0.51 (Fedora)
  Location: http://www.miabrown.com:85/mia/
  Connection: close
  Content-Type: text/html; charset=iso-8859-1

Notice that the Location: header that your webserver is returning
has your server's FQDN in it; rather than your magic IP address.
This is the result of an Apache configuration setting.


It is very common for most people to not truely understand the nature
(and usual mandatory one) of the trailing slash in URLs.  For instance,
"http://www.acme.com"; is NOT a valid URL; but
"http://www.acme.com/"; is.  Fortunately, most people can get by with
being sloppy and ignorant of the rules because the web browser
and web server software often corrects these errors silently.  But,
as you can see in your case, not following the rules will sometimes
bite you.

At best case, failing to specify trailing slashes results in inefficiency,
in that it actually takes two web requests to get a page rather than one.
-- 
Deron Meranda


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux