We have implemented this using AliasMatch directives in the Apache
configuration file.
Here is our recipe:
AliasMatch ^/.+/(.+)\.php /website/$1.php
AliasMatch ^/(.+)\.php /website/$1.php
AliasMatch ^/.* /website/start.php
What this achieves is that any specific reference to a PHP script (even if
apparently buried down in a subdirectory) is actually served by a PHP script
in the document root of the site. Any reference that is not explicitly to a
PHP script is served by the start.php script.
The start.php script looks at the actual URL asked for (using the
$REQUEST_URI variable) and does some database lookups to generate the pages.
So the request for a "page" such as
http://www.pco.powys.org.uk/cap/page2.html is translated by the PHP scripts
to a database lookup for page 2 for user "cap"
You can see this in operation at http://www.pco.powys.org.uk/
If you want any more information, please contact me off the list.
Kind regards
Nick Talbott
IT Policy and Strategy Manager, Powys County Council, UK
email [EMAIL PROTECTED]
FAX +44 (0) 1597 824781
web http://www.powys.gov.uk and http://www.powysweb.co.uk
-----Original Message-----
From: andreas (@work) <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: 06 February 2001 07:23
Subject: [PHP] solution
>hi all,
>
>we need to have a solution for the following stuff:
>
>each member of the community should get his own page
>
>something like
>
>www.domain.com/tacco
>www.domain.com/micco
>www.domain.com/sicco
>
>
>.....
>
>
>and we dont liek to build this structure as webfolders
>
>
>so what we are thinking of is:
>
>a 404 php-file which extracts the path and generates a page for that out
of
>mysql
>
>
>so, if someone likes to access
>
>www.domain.com/tacco
>
>theres no file but our 404php document will extract
>
>tacco
>
>and generate the page tacco from the database
>
>
>===========
>
>possible ?
>
>or is there a better solution out there ?
>
>
>greetings
>
>andreas
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]