Two-digit back-references in ISAPI_Rewrite and Ape

We’ve planned to implement it for a long time and eventually it’s done.

In ISAPI_Rewrite 3.1.0.70 and Ape 3.0.0.32 one can have more than 9 submatches and consequently more than 9 back-references in both RewriteCond and RewriteRule (RewriteProxy, RewriteHeader) statements.

The syntax to address these submatches is illustrated in the following example:

RewriteBase /
RewriteCond %{QUERY_STRING} ^id1=(\d+)&id2=(\d+)&...&id10=(\d+)&id11=(\d+)$
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)...
  .../([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$
    %1/%2/%3/%4/%5/%6/%7/%8/%9/%%10/%%11?id1=$1&id2=$2&...&id10=$$10&id11=$$11 [L]

Note! This syntax is not supported in Apache.

Note! We highly recommend to avoid rules like that (as they indicate your URLs are not really SEO-friendly), but if there’s no other way out, do use it.

We believe this small bit of functionality will save you time and efforts.

Best regards,
Anton, Helicon Tech Team

This entry was posted in Helicon Ape, ISAPI_Rewrite. Bookmark the permalink.

3 Responses to Two-digit back-references in ISAPI_Rewrite and Ape

  1. Very beneficial thanks, I do believe your trusty audience would most likely want more content along these lines keep up the great work.

  2. Nancy says:

    Thanks for the share!
    Nancy.R

  3. Gabriel Cole says:

    Truly insightful thank you, I believe your readers will likely want considerably more stories along these lines carry on the good hard work.