Ampersand (&) htaccess urlencode problem

by Prakash 2015-02-27 16:37:06

Htaccess can create problems if any of your GET parameters have 
the character Ampersand (&) even though it is urlencoded.

For example I have a get parameter called Apple&Orange when I urlencode it the Ampersand (&) symbol will be converted to %26. And this will work fine in dynamic urls like :

mypage.php?tag=Apple&Orange

But in htaccess in order to produce clean urls we may have used like :

mypage.php?tag=$1&page=$2

So the tag parameter in the receiving page will be Apple instead of Apple&Orange.

Adding B flag will solve this issue in htaccess.

mypage.php?tag=$1&page=$2 [B]

1285
like
0
dislike
0
mail
flag

You must LOGIN to add comments