httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete Houston <>
Subject Re: [users@httpd] Re: Curious inability to mod_rewrite absolute paths
Date Thu, 02 Jan 2014 09:46:56 GMT
On Wed, Jan 01, 2014 at 09:55:48PM -0500, Borden Rhodes wrote:
> I notice in the log that httpd passes the requests for the first two images 
> through RewriteRule in the .htaccess file. However, the call to fetch 
> /images/bowler.jpeg *doesn't* go through the RewriteRule, but instead (line 50 
> in the log) goes straight through protocol.c and, predictably, fails. This 
> raises three questions:
> 1) Why is the absolute path *not* being passed through a rewrite rule but the 
> other two requests are?

Because the absolute path does not go anywhere near the "dummy"
directory which is where your .htaccess file is, so the .htaccess file
never gets read for that request.

> 2) Can I change this behaviour from an .htaccess file?
> 3) If so, how?

Put your .htaccess file somewhere that it will actually be read for the
requests which you want it to affect.

BTW, you don't need mod_rewrite for this sort of redirection. mod_alias
would do just as well and be more lightweight and less confusing. Your
choice, however.

All the best,

Openstrike - improving business through open source or call 01722 770036 / 07092 020107

View raw message