Reorganizing Large Web Site

M

Mike Copeland

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 (www.raceplaceevents.com) 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:

/
/include/
/results/
/images/

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
this:

<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
files:

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

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
 
D

dorayme

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

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

I often use on Unix servers constructions like

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

for their portability.
 
P

Peter

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 (www.raceplaceevents.com) 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:

/
/include/
/results/
/images/

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
this:

<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
files:

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

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

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
around.
 

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

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top