RewriteRule - webspace vs. filesystem

RewriteRule - webspace vs. filesystem

am 08.02.2010 14:23:58 von ef-lists

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


SetHandler ...



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

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: RewriteRule - webspace vs. filesystem

am 08.02.2010 14:29:51 von Eric Covener

On Mon, Feb 8, 2010 at 8:23 AM, Edgar Frank 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 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
context.

--
Eric Covener
covener@gmail.com

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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

Protocol transistion between Basic Auth anh Kerberos.

am 08.02.2010 15:23:42 von Dag.Efjestad

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 Window=
s Integrated secuity, so Apache need to be able to translate basic authenti=
cation into a Kerberos ticket on behalf of the user. (This is possible in M=
S ISA server)

Is it possible with Apache web server?=20


Thanks, Dag Efjestad

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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