Re: solution
| From: | Nick Talbott | Date: | Tue, 06 Feb 2001 15:27:18 +0000 |
| Subject: | Re: solution | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-38391@lists.php.net to get a copy of this message | ||
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 nickt@powys.gov.uk
FAX +44 (0) 1597 824781
web http://www.powys.gov.uk and http://www.powysweb.co.uk
-----Original Message-----
From: andreas (@work) <myviva@utanet.at>
To: php-general@lists.php.net <php-general@lists.php.net>
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: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>