3.32.2. RewriteUsername Previous topic Parent topic Child topic Next topic

This parameter enables you to alter the user name in authentication and accounting requests before they are passed to any of the AuthBy clauses in this group. For more information, see Section 8. Rewriting user names.
You can have any number of RewriteUsername parameters in a group. The rewrites will be applied to the user name in the same order that they appear in the configuration file. At Trace level 4, you can see the result of each separate rewrite for debugging purposes.
# 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/