views:

17

answers:

0

Hi! I want to make a rewrite rule from edit/[email protected] to [email protected] :

RewriteEngine On
RewriteRule ^edit/([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$ edit.php?email=$1 [NC,L]

~ where [\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?) is the regexp from regexlib to simple match email

But it doesnt work! The edit.php is in the same directory (action) where .htaccess is. Which is the best scenario in RewriteRule to match the email adress, such like:

http://example.com/action/edit/[email protected] will be interpreted by http://example.com/action/edit.php in action dir?

Probably I also need to use %40 htmlentity instead @ ?