AW: [PHP] Non-existant folders??
| From: | Sebastian Stadtlich | Date: | Tue, 23 Jan 2001 13:53:45 +0000 |
| Subject: | AW: [PHP] Non-existant folders?? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-36190@lists.php.net to get a copy of this message | ||
hi
you can do that by assigning custom error pages if you use apache.
if you have access to the hhtp.conf place this in it :
ErrorDocument 404 /redirect.php
is you can't access httpd.conf you can hope that you are allowed to
overide it by a .htaccess....
in redirect.php you need to parse the $REDIRECT_SCRIPT_URI
to know what the user wanted to see.....
also you have to send a header("HTTP/1.1 200 OK");. otherwise
apache will ad 404 by itself an IE will display it's stupid
own errormessages....
sebastian
> Hi,
> I'm creating a little app whereby people will be able to
> create a simple
> site for themselves (maybe 10 html pages).
> here's the problem:
> say their company is called "companyname" and my site is called
> "www.mysite.com" i'd like their site to be located at
>
> "http://www.mysite.com/companyname"
>
> Is there a way i can do this without creating indivual
> folders for each
> company.I'd like the whole creation process to be automated.
> I'm sure the ftp functions in php would allow for the
> generation of new
> folders for each,but since all content/style etc. will be
> pulled from a DB
> it's seems to me a little pointless having all these folders
> with the same
> php page in each.essentially i'd like a php script to run
> automatically each
> time taking what looks like a folder name and making a call
> to the db using
> this name as a variable.
> easy,difficult or impossible?
> thanx,
> adrian
>
>
> --
> 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
>