Eric Covener wrote: > On Mon, Aug 10, 2009 at 12:13 PM, Issac Goldstand<[email protected]> wrote: > >> Hi, >> After a colleague at work was struggling with the Redirect directive, >> I realized that the docs could be a bit clearer. I prepared a small >> patch, but didn't want to commit myself simply because I'm not 100% sure >> of the patch-xml/ant/html processes for committing doc patches. >> >> This is against httpd-2.2.13 (should patch fine to trunk, too). >> >> Issac >> >> Index: manual/mod/mod_alias.xml >> =================================================================== >> --- manual/mod/mod_alias.xml (revision 800376) >> +++ manual/mod/mod_alias.xml (working copy) >> @@ -214,7 +214,8 @@ >> >> <p>Then any request beginning with <em>URL-Path</em> will return a >> redirect request to the client at the location of the target >> - <em>URL</em>. Additional path information beyond the matched >> + <em>URL</em>. If <em>URL-Path</em> ends with a trailing slash, >> + then additional path information beyond the matched >> <em>URL-Path</em> will be appended to the target URL.</p> >> > > Can you demonstrate the trailing-slash/no-trailing-slash difference > this is describing? I wasn't able to recreate. > > Sure. I'll do this from memory, but if you can't reproduce, I'll try to get a hold of the old config that my colleague was bashing his head against.
Let's say you have a line Redirect 301 /foo/bar. /baz/bar.extension One would assume from the docs that this would rewrite /foo/bar.something to /baz/bar.extension.something However, this isn't the case, since /foo/bar.something doesn't end with a / and therefore mod_alias is looking for an exact match (in alias_matches) and the request doesn't get modified at all The redirect would need to be done using RedirectMatch or mod_rewrite --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
