Reorganizing Large Web Site

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
   I'm having difficulty with my attempts to reorganize my large Web
site files.  For the past 13 years I've been building and adding to this
site ( by placing all files in the root
directory.  (I never had time to do it right...)
   Now, I'm modifying the root index files to use subdirectories, as
well as move the data files there.  The root files (originally prepared
by someone else) are .PHP files and have "include links" that now don't
work.  The directory structure looks like this:


   I moved data files to "results", and I've taken a root link that used
to point to data links within that file (it's now quite large!) with

   <a href="#1998">1998</a>

and changed it to:

   <a href="results/results1998.php">1998</a>

   I rebuilt the internal link tables that housed the links to the data

      <td class="header_text" align="center">1998<A NAME="1998"></a>
      <td class="bordered_text">
    <table width="100%" class="page_text">
              <th style="width:100px">Event Date</th><th>Event Name</th>
          <td>December 13</td>
              <td><a href="fbt98res.htm" >Insight Fiesta Bowl 10K</a>          

   The new reference finds the new file (that's now in /results/), but
this modified file has some boilerplate "include" links that don't work
now because they're based off the directory root, not the lower
"results" directory where this file now resides (e.g.):

<? include "include/page_top.php"; ?>

   My question is: how do I modify the "include" statements to reference
the root directory?  (I know this is a remedial query, but my experience
is only with DOS and Windows file organizations, not what exists on my
Web site.)  8<{{  Please advise  TIA

Re: Reorganizing Large Web Site

In article (Mike Copeland) wrote:

Quoted text here. Click to load it

Try <? include "../include/page_top"; ?> in your case

I often use on Unix servers constructions like

<?php include
($_SERVER['DOCUMENT_ROOT'].'/includes/'); ?>

for their portability.


Re: Reorganizing Large Web Site says...
Quoted text here. Click to load it

Some programs, such as Dreamweaver, will keep track of file locations
and adjust all file references accordingly. Not sure with a complex
situation like yours, whether it would be 100% reliable and it is a bit
like closing the door after the horse has bolted, but maybe there are
others that would have done the same. However, this would require you to
make sure everything was in its original location before referencing it
with the required software and then using the software to move things

Pete Ives
Remove All_stRESS before sending me an email

Site Timeline