httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Baker <>
Subject Re: [users@httpd] Differences in .htaccess and httpd.conf
Date Wed, 02 Jul 2003 16:02:58 GMT
You are exactly right!  I didn't realize where it works and where it 
doesn't!  The following line:

RedirectMatch 302 test.php(.*)$1

Redirects in: <Directory>, <VirtualHost>, and .htaccess

but ONLY passes the GET arguments in: <VirtualHost>

If I put that same command in any of those three places, the redirect works 
fine, but to get the GET variables requires it to be in the virtual host 
for that site.  Hmmmmmm...  I wonder if things would be any different on 
Apache 2.x

At 06:29 AM 7/2/2003 +0200, you wrote:
> > RedirectMatch 302 test.php(.*)$1
> >
> > <>Apache
> > docs say it should be ok. It says it should over-ride just fine, I'm not
> > sure why there is different behavior in the .htaccess file.
>After some investigation, I doubt that it works in the httpd.conf. An access
>file is anolgue to a <Directory> block. If you put the RedirectMatch
>directive in a <Directory> block, I think you would experience the same
>thing as if you have it in an access file.
>I don't know why that is so, but I can speculate that when in the directory
>scope, the query string has been cut off from the URI, so you cannot match
>I'm sorry, but I cannot think of a good work around for the moment. One
>thing you could do is to have a little PHP script there:

Scott Baker - Webster Internet
Network Engineer - RHCE - 503.266.8253 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message