Re: mod_rewrite & open_basedir & pear
| From: | Alexei Tenitski | Date: | Tue, 28 May 2002 12:31:48 +0000 |
| Subject: | Re: mod_rewrite & open_basedir & pear | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1479@lists.php.net to get a copy of this message | ||
Hi Stig
> > > > mod_rewrite is used to _hide_ urls from users and to _extend_ url with
> > > > additional params.
> > Do you know ways to implement above by php only?
> One technique is to have an empty document root and only a 404 handler
> (you need to have "Options -Indexes" and a 403 handler to catch accesses
> to "/").
>
> The 404 handler just examines the URL and either does a readfile() (plus
> content-type and last-modified headers) from your internal document
> root, or a virtual() call to route the call to somewhere else served by
> Apache.
>
> I've used this with great success to implement an interface to a CMS
> providing plain URLs (ala /news/2002052801.html) instead of query-style
> URLs (ala /news.php?id=2002052801).
Virtual looks interesting...
In the man it's written that
virtual() cannot be used to include a document which is itself a PHP
file.
but I suppose http headers allow include anything and php files as well.
however, neither readfile nor virtual can pass post variables
to the included script - am i correct?
Most of the project is based on post requests.
Virtual:
"virtual -- Perform an Apache sub-request"
Apache sub requests (when doing subrequest from .htaccess):
"This uses an internal
subrequest to determine the check, so use it with care because
it decreases your servers performance!"
Do we have the same story with performance decreases when doing virtual?
Alexei