Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Reorganizing Large Web Site (http://www.velocityreviews.com/forums/t807793-reorganizing-large-web-site.html)

Mike Copeland 01-08-2012 06:06 PM

Reorganizing Large Web Site
 
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

dorayme 01-08-2012 08:44 PM

Re: Reorganizing Large Web Site
 
In article
<MPG.2973890ac746167a9896ec@news.eternal-september.org>,
mrc2323@cox.net (Mike Copeland) wrote:

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

--
dorayme

Peter 01-09-2012 06:55 PM

Re: Reorganizing Large Web Site
 
In article <MPG.2973890ac746167a9896ec@news.eternal-september.org>,
mrc2323@cox.net says...
> 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.

--
Pete Ives
Remove All_stRESS before sending me an email


All times are GMT. The time now is 09:28 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.