Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Docs

Patch for mod_alias.xml

 

 

Apache docs RSS feed   Index | Next | Previous | View Threaded


margol at beamartyr

Aug 10, 2009, 9:13 AM

Post #1 of 8 (1316 views)
Permalink
Patch for mod_alias.xml

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
Attachments: alias.diff (0.64 KB)


covener at gmail

Aug 10, 2009, 10:37 AM

Post #2 of 8 (1256 views)
Permalink
Re: Patch for mod_alias.xml [In reply to]

On Mon, Aug 10, 2009 at 12:13 PM, Issac Goldstand<margol [at] beamartyr> 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.

--
Eric Covener
covener [at] gmail

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd


margol at beamartyr

Aug 10, 2009, 11:47 AM

Post #3 of 8 (1255 views)
Permalink
Re: Patch for mod_alias.xml [In reply to]

Eric Covener wrote:
> On Mon, Aug 10, 2009 at 12:13 PM, Issac Goldstand<margol [at] beamartyr> 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: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd


covener at gmail

Aug 10, 2009, 12:34 PM

Post #4 of 8 (1252 views)
Permalink
Re: Patch for mod_alias.xml [In reply to]

On Mon, Aug 10, 2009 at 2:47 PM, Issac Goldstand<margol [at] beamartyr> wrote:
> Eric Covener wrote:
>> On Mon, Aug 10, 2009 at 12:13 PM, Issac Goldstand<margol [at] beamartyr> 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
>

OK, i think it just needs more careful phrasing. I read the updated
behavior as implying:

Redirect /a/b http://example.com/x

Wouldn't send /a/b/c to http://example.com/x/c

So it needs to capture that aspect of no-trailing-slash as well.

--
Eric Covener
covener [at] gmail

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd


bobsiegen at googlemail

Aug 10, 2009, 12:46 PM

Post #5 of 8 (1254 views)
Permalink
Re: Patch for mod_alias.xml [In reply to]

2009/8/10 Issac Goldstand <margol [at] beamartyr>:
> 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

Yes, but a request for /foo/bar./other/some would become
/baz/bar.extension/other/some with your redirect directive. So may be
you should word that the string compared against the URL-path argument
of the directive must have a slash beyond the match in order to append
additional path information to the URL-argument of the directive.

But may be "Additional path information" may word that already if
you're defining additional path information as /path/info and not foo.

Bob

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd


margol at beamartyr

Aug 10, 2009, 1:24 PM

Post #6 of 8 (1246 views)
Permalink
Re: Patch for mod_alias.xml [In reply to]

Eric Covener wrote:
> On Mon, Aug 10, 2009 at 2:47 PM, Issac Goldstand<margol [at] beamartyr> wrote:
>
>> Eric Covener wrote:
>>
>>> On Mon, Aug 10, 2009 at 12:13 PM, Issac Goldstand<margol [at] beamartyr> 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
>>
>>
>
> OK, i think it just needs more careful phrasing. I read the updated
> behavior as implying:
>
> Redirect /a/b http://example.com/x
>
> Wouldn't send /a/b/c to http://example.com/x/c
>
> So it needs to capture that aspect of no-trailing-slash as well.
>
>
That was the point. It should convey that the auto-completion only
works if URL-Path ends with a /

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd


niq at apache

Aug 10, 2009, 3:08 PM

Post #7 of 8 (1256 views)
Permalink
Re: Patch for mod_alias.xml [In reply to]

On 10 Aug 2009, at 17:13, Issac Goldstand wrote:

> Hi,
> After a colleague at work was struggling with the Redirect
> directive,
> I realized that the docs could be a bit clearer.

Is this anything to do with PR#47644 ?

--
Nick Kew

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd


margol at beamartyr

Aug 10, 2009, 10:02 PM

Post #8 of 8 (1256 views)
Permalink
Re: Patch for mod_alias.xml [In reply to]

Nick Kew wrote:
>
> On 10 Aug 2009, at 17:13, Issac Goldstand wrote:
>
>> Hi,
>> After a colleague at work was struggling with the Redirect directive,
>> I realized that the docs could be a bit clearer.
>
> Is this anything to do with PR#47644 ?
>
<sarcasm>I love how these issues always tend to magically appear days or
just weeks apart. It's uncanny!</sarcasm>

It could be. I'll glance at the code and tinker with the config and see
if it could be MultiViews related, and follow-up here.

Issac

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd

Apache docs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.