> The answer:
>
> RewriteCond %{REQUEST_URI} ^/id/(.*)
> RewriteCond ${ids:%1} !^$
> RewriteRule ^/id/(.*)$ ${ids:$1} [R=301]
> It's a bit filthy that the first RewriteCond and the pattern in the
> RewriteRule are duplicated, but I don't know if there's a way to improve
> that.
Maybe some room for removing some of the duplication:
You can use $1 in the RewriteCond, avoiding the first condition altogether.
You could also change the 2nd condition to be (.+) and use %1 in the
RewriteRule instead of re-consulting the map (this one is arguably not
worth the complexity because the duplication isn't as bad)
--
Eric Covener
[email protected]
---------------------------------------------------------------------
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: [email protected]
" from the digest: [email protected]
For additional commands, e-mail: [email protected]