'%1, %2, %3...' not work in RewriteRule

Jan 18, 2010 at 7:48 AM

references to the matched substrings in the most recently evaluated RewriteCond associated to that RewriteRule. [Don't worry too much about RewriteCond just yet. We'll get to that in a minute. Just be aware that the replacement string can contain references to matched substrings from a RewriteCond.] These take the form %n, where n is a digit. (Eg %1, %2, %3...)

Jan 18, 2010 at 7:55 AM

RewriteCond %{HTTP_HOST} ^(a)\.domain\.com$ [I]
RedirectRule ^/.*$ http://www.domain.com/?host=%1 [I,R=301]

Supposed to jump to 'http://www.domain.com/?host=a'
but it jump to 'http://www.domain.com/?host=%1'


Jan 18, 2010 at 12:20 PM

that's old documentation.   Use * as the prefix in place of %.   *1, *2, *3.

Show me the place in the doc with that content and I'll fix it.

Jan 19, 2010 at 4:40 AM

IirfGuide.chm >

Configuring IIRF > Site-specific Directives > RewriteRule > The Replacement String

Jan 19, 2010 at 4:57 AM

When I go there in the latest doc, here's what I see:


Jan 19, 2010 at 5:12 AM

But I saw this:

Jan 19, 2010 at 5:26 AM

Yes, I think that has been updated.

At one point it was incorrect, and I corrected it. The current .CHM should be correct now.