[web-team] Bug on ....http://www.svlug.org/policies/list-policy.php

Lisa svlug at flygirl.com
Thu Jul 10 09:31:30 PDT 2008


On Thu, Jul 10, 2008 at 12:09:04AM -0700, Rick Moen wrote:

>> If you go to ...http://www.svlug.org/policies/list-policy.php
>> and then click on the banner, you will get a 404 Not Found.
>> Not sure who will look into this...
> 
> So, I'm hoping Lisa will.  As a reminder, the header for all pages used
> to be implemented using a server-side include.  Lisa re-implemented this 
> concept in PHP, for her changeover.  (To my knowledge, that's the sole
> purpose for which we're using PHP, as a glorified SSI replacement.)

Not *quite* the whole story.  That was the main reason it was
done, yes.  But PHP code now does the sponsor rotation in the
left column, as well as updating the events tables.

> There's a zero-length file called HOME in /var/www/svlug-main/ .  Inside
> /var/www/svlug-main/header.php (the header "include" file), one finds this:
> 

<code removed for brevity>

> I'm a bit tired out at the moment, and don't fully understand
> how that logic is supposed to work.  In any event, the link
> _ought_ to resolve to "../index.php", but instead is resolving
> to "./index.php" (or such). That is, clicking on the banner
> image is supposed to always take you to the top of the site,
> http://www.svlug.org/index.php .

The problem with doing that was that when I was developing the
site, I had to have it within a subdirectory of the main site
and, therefore, needed it to resolve to the top of THAT part of
the site.

Some of this *could* now be removed but, frankly, it comes in
handy for testing the site elsewhere.  For example, we can
theoretically have a test subdirectory that would be a full copy
of the site.  And, yes, I know there are other ways to do that.
:-)

> To be really picky, such a relative link should always,
> always, always be to "./" or "../", and never to anything
> ending in index.html or index.php, etc.  Why?  Because:
> 
> 1.  Having some links go to http://www.example.com/, and
> others to http://www.example.com/index.{html|shtml|php*}
> causes users' browser caches to load twice for the same page
> content.  That's bad.
> 
> 2.  Exposing to public HTML the specific filenames of
> directory index files makes it likely that people will
> bookmark those URLs, which will then break if/when you change
> to a different type of directory index file.  E.g., people who
> bookmarked "http://www.svlug.org/index.shtml" got 404s the day
> Lisa removed index.shtml and replaced it with index.php.  If
> they'd never seen anything but "http://www.svlug.org/", they'd
> have bookmarked that, and the link would have remained
> unbroken.
> 
> I could fix that (I _think_) in Lisa's header.php file by
> replacing "index.php" with "./" -- but figure I should check
> with her here, first.

It now shows "/index.php" in the special case (normal, in our
case) where the "HOME" file is in the root.  I have no problem
with your replacing that with "/" if you like.  I concur with
most of your above reasoning.  Again, this is one of those
issues that I did "the quick way" without a lot of thought to
get the website back up.

> The other problem, the problem of hyperlinking the banner to
> non-existent page http://www.svlug.org/policies/index.php, I'm
> even more reluctant to try to fix on my own.  Lisa?  (Thanks.)

Done... expanation in my above paragraph.

Lisa



More information about the web-team mailing list