Posted by Arjen on 01/12/07 06:54
McKirahan schreef:
> I am looking for feedback on an approach to using PHP.
>
> Below is a stripped down version of a Home page: "index.php".
>
> The content of the site is displayed in the middle of the page and
> is "included" via "Page1.htm", "Page2.htm", or "Page3.htm".
>
> The page to be "included" is specified via the QueryString
> which is specified in the navigational hyper links;
> for example, "index.php?Page1".
>
>
> <html>
> <head>
> <title><?php echo $_SERVER["PHP_SELF"] ?></title>
> </head>
> <body>
> <table border="0" cellspacing="0" cellpadding="0" width="100%"
> height="100%">
> <tr>
> <td bgcolor="green" colspan="3"> </td>
> </tr>
> <tr>
> <td bgcolor="red" width="5"%> </td>
> <td bgcolor="white" width="90%">
> <p align="center">
> <a href="index.php?Page1">Page 1</a> |
> <a href="index.php?Page2">Page 1</a> |
> <a href="index.php?Page3">Page 3</a>
> <hr>
> </p>
> <!-- Content Below -->
> <?php
> $QS = $_SERVER["QUERY_STRING"];
> echo $QS;
> if ($QS == "Page1") include "Page1.htm";
> elseif ($QS == "Page2") include "Page2.htm";
> elseif ($QS == "Page3") include "Page3.htm";
> else include "Page1.htm";
> ?>
> <!-- Content Above -->
> <br><br>
> </td>
> <td bgcolor="blue" width="5%"> </td>
> </tr>
> <tr>
> <td bgcolor="yellow" colspan="3"> </td>
> </tr>
> </table>
> </body>
> </html>
>
> One advantage I see to this approach is that the "content" pages
> are isolated from the "master" page and can be easily maintained.
>
> One disadvantage I see to this approach is that search engines
> would not be able to catalog the site beyond the Home page.
Why wouldn't a search engine be able to catalog ?
Google can follow dynamic urls
For a nicer url use mod rewrite
/mymap/my-title.html /index.php?QS=3 [NC]
or something more dynamic
/page_(.+).php /index.php?QS=$1 [NC]
> Are there other disadvantages (or other considerations) that I don't see?
Yup .. duplicate content (index.php?QS=wooooooom)
--
Arjen
http://www.hondenpage.com - Mijn site over honden
[Back to original message]
|