3.25.1. RewriteUsername Previous topic Parent topic Child topic Next topic

This parameter enables you to alter the user name in authentication and accounting requests when they are handled by this Realm or Handler. For more information, see Section 8. Rewriting user names.
You can have any number of RewriteUsername parameters in a Realm or Handler. The rewrites will be applied to the user name in the same order that they appear in the configuration file. The rewrites are applied after any global or per-Client rewrites. At Trace level 4, you can see the result of each separate rewrite for debugging purposes.
RewriteUsername will be ignored if there is a RewriteFunction defined for this Realm or Handler.
# Strip the realm from all requests, because our
# database only has user names (no realm)
RewriteUsername   s/^([^@]+).*/$1/

# Translate all uppercase to lowercase
RewriteUsername   tr/A-Z/a-z/