You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Edgar Frank <ef...@email.de> on 2010/02/08 14:23:58 UTC
[users@httpd] RewriteRule - webspace vs. filesystem
Hello list,
I've got a problem with RewriteRule and the separation of web
space and filesystem.
I want to rewrite virtual directories on the server to the URL
/index.php
/index.php exists only inside the webspace and does not reside
physically on the webserver. It is forwarded via FastCGI to an
external server with a Location section and a SetHandler
directive (which I can confirm to work for
http://myhost/index.php).
This is the relevant, minimal configuration:
DocumentRoot /www
RewriteRule /dir /index.php
<Location "/index.php">
SetHandler ...
</Location>
PHP will look at the REDIRECT_URL / REQUEST_URI env-var (this is
imposed by the Zend framework and the project restrictions) to
figure out how it was called.
The problem I have is, that Apache complains that /www/index.php
is not found - which is absolutely right, as index.php only
exists in the webspace and not in the filesystem. But I would
expect Apache to consider the Location section instead and not
to try URL-to-file-mapping.
The access log says:
[...] "GET /dir HTTP/1.1" 404 [...]
The error log says:
[...] File does not exists: /www/index.php
The rewrite log says:
[...initial] (2) init rewrite engine with requested uri /dir
[...initial] (3) applying pattern '/dir' to uri '/dir'
[...initial] (2) rewrite '/dir' to '/index.php'
[...initial] (2) local path result: /index.php
[...initial] (2) prefixed with document_root to /www/index.php
[...initial] (1) go-ahead with /www/index.php [OK]
The [R] flag is not applicable as this would result in a loss of
the env-vars which PHP needs.
How can I solve this problem? Maybe there is a flag for the
RewriteRule I missed? Some basic misunderstanding in internal
RewriteHandling? Is this even possible?
Regards,
Edgar
--
Edgar Frank <ef...@email.de>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Protocol transistion between Basic Auth anh Kerberos.
Posted by "Efjestad, Dag" <Da...@solvea.no>.
Hi,
I want to use Apapche as reverse proxy against MS SharePoint with negotiate (Kerberos) enabled from Internet. I can't set the client to support Windows Integrated secuity, so Apache need to be able to translate basic authentication into a Kerberos ticket on behalf of the user. (This is possible in MS ISA server)
Is it possible with Apache web server?
Thanks, Dag Efjestad
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] RewriteRule - webspace vs. filesystem
Posted by Eric Covener <co...@gmail.com>.
On Mon, Feb 8, 2010 at 8:23 AM, Edgar Frank <ef...@email.de> wrote:
> The problem I have is, that Apache complains that /www/index.php
> is not found - which is absolutely right, as index.php only
> exists in the webspace and not in the filesystem. But I would
> expect Apache to consider the Location section instead and not
> to try URL-to-file-mapping.
>
Apache only complains when no handler steps up to generate a response
for the URL, and the default/core static-file handler kicks into gear.
Your <Location> doens't match the result of your rewrite. Perhaps
you're missing RewriteBase or using a "relative" string for your
substitution, or not using the 'PT' flag for your rules if they're in
<virtualhost> context.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org