Hi --

Is it possible to have mod_rewrite unescape backreferences? I would like to
allow users to access resources through a user-specific URLs, created by
embedding a user-provided email address in the URL:

/docs/[EMAIL PROTECTED]

I have a form that allows users to enter their email and submits a GET to a
CGI:

http://www.example.com/cgi-bin/test.cgi?email=testuser%40yahoo.com

I've created a mod_rewrite rule to trap the above pattern and rewrite it:

RewriteCond %{QUERY_STRING} email=([EMAIL PROTECTED])$
RewriteRule ^/cgi-bin/test.cgi /docs/%1 [PT]

The above is not a very sophisticated email match, but works for this
example. This gives me:

/docs/testuser%40yahoo.com

Is there a way to tell mod_rewrite to un-escape the matched backreference so
I get the @ sign in the URL instead of %40?

Thank you in advance!

Ramon

Reply via email to