Escape Backreferences in htaccess - redirecting %2B to +

by Rekha 2010-03-02 15:44:33

Hi,

I faced a issue in redirecting urls having special characters like +,# etc,

I solved the issue by escaping the backreferences as follows,

[B] - Causes backreferences to be escaped to preserve special characters

RewriteRule ^(.*)$ index.php?type=$1
RewriteRule ^(.*)$ index.php?type=$1 [B]



In the above example,the former will collapse escaped characters (convert %2b to + for
example) while the latter will preserve them (stay as %2b)

Tagged in:

1616
like
0
dislike
0
mail
flag

You must LOGIN to add comments