> 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
cove...@gmail.com

---------------------------------------------------------------------
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to