Re: Dynamic directory structures
From: CountScubula (me_at_scantek.hotmail.com)
Date: 12/30/03
- Next message: Pedro Graca: "Re: PHP4 network functions"
- Previous message: Five Cats: "Re: OT: where to get mySQL questions answered?"
- In reply to: Erik Andersson: "Dynamic directory structures"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Dec 2003 09:30:30 GMT
Ok, I got a simple set up that works, I just tested it,
in your .htaccess file add this
ErrorDocument 404 /dynpage.php
and the dynpage.php reads as follow
<?php
$r = $_SERVER['REQUEST_URI'];
list($n,$page,$sub_category_id) = split($r);
// note $sub_category_id is already set now, so dont look for it with a
$_GET
include("$page.php");
?>
You can see a funky example at http://findit.myhq.info/cars/trucks
-- Mike Bradley http://gzen.myhq.info -- free online php tools
- Next message: Pedro Graca: "Re: PHP4 network functions"
- Previous message: Five Cats: "Re: OT: where to get mySQL questions answered?"
- In reply to: Erik Andersson: "Dynamic directory structures"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|