You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Morse, Richard E.MGH" <RE...@PARTNERS.ORG> on 2012/02/10 17:18:25 UTC

[users@httpd] Apache 2.2 RedirectMatch url behaviour in a Directory context?

Hi! I was wondering if RedirectMatch did any stripping of the URL when in a Directory context?

According to the documentation, a Rewrite rule does have the URL stripped so that it starts with the directory, but the documentation doesn't say whether or not this also happens for RedirectMatch.

I ask because I would like to anchor the front of my regex if possible, but I don't know exactly what the prefix above my directory is going to be. Tests seem to indicate that the prefix isn't stripped, but I wanted to check and see if there was something I was missing.

example:

	RedirectMatch ^/foo/([a-z-]+)$ http://www.example.com/$1


Thanks,
Ricky


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


---------------------------------------------------------------------
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] Apache 2.2 RedirectMatch url behaviour in a Directory context?

Posted by Yehuda Katz <ye...@ymkatz.net>.
I don't know the answer, but the way I would probably try to find the
answer is to do what you have already done: Try it and see what happens.

- Y

On Fri, Feb 17, 2012 at 11:48 AM, Morse, Richard E.MGH <REMORSE@partners.org
> wrote:

> Hi! I was wondering if anyone had had a chance to look at this? Or could
> tell me where to look to find the answer? The manual doesn't seem to have
> this, noone has answered my query on ServerFault, and my skills at reading
> the httpd source aren't up to answering it that way...
>
> Thanks,
> Ricky
>
> On Feb 10, 2012, at 11:18 AM, Morse, Richard E.MGH wrote:
>
> > Hi! I was wondering if RedirectMatch did any stripping of the URL when
> in a Directory context?
> >
> > According to the documentation, a Rewrite rule does have the URL
> stripped so that it starts with the directory, but the documentation
> doesn't say whether or not this also happens for RedirectMatch.
> >
> > I ask because I would like to anchor the front of my regex if possible,
> but I don't know exactly what the prefix above my directory is going to be.
> Tests seem to indicate that the prefix isn't stripped, but I wanted to
> check and see if there was something I was missing.
> >
> > example:
> >
> >       RedirectMatch ^/foo/([a-z-]+)$ http://www.example.com/$1
> >
> >
> > Thanks,
> > Ricky
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
> ---------------------------------------------------------------------
> 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] Apache 2.2 RedirectMatch url behaviour in a Directory context?

Posted by "Morse, Richard E.MGH" <RE...@PARTNERS.ORG>.
Hi! I was wondering if anyone had had a chance to look at this? Or could tell me where to look to find the answer? The manual doesn't seem to have this, noone has answered my query on ServerFault, and my skills at reading the httpd source aren't up to answering it that way...

Thanks,
Ricky

On Feb 10, 2012, at 11:18 AM, Morse, Richard E.MGH wrote:

> Hi! I was wondering if RedirectMatch did any stripping of the URL when in a Directory context?
> 
> According to the documentation, a Rewrite rule does have the URL stripped so that it starts with the directory, but the documentation doesn't say whether or not this also happens for RedirectMatch.
> 
> I ask because I would like to anchor the front of my regex if possible, but I don't know exactly what the prefix above my directory is going to be. Tests seem to indicate that the prefix isn't stripped, but I wanted to check and see if there was something I was missing.
> 
> example:
> 
> 	RedirectMatch ^/foo/([a-z-]+)$ http://www.example.com/$1
> 
> 
> Thanks,
> Ricky


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


---------------------------------------------------------------------
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