Re: base64_encode, forward slashes and mod_rewrite
| From: | Dan Rossi | Date: | Fri, 24 Feb 2006 00:00:56 +0000 |
| Subject: | Re: base64_encode, forward slashes and mod_rewrite | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230991@lists.php.net to get a copy of this message | ||
sorry Ive done it again, for anyones interest, you might have to urlencode the string twice for mod_rewrite to accept encrypted and base64_encoded strings which add slashes and ampersands into their strings.
It is confirmed there is a bug in mod_rewrite and doesnt like the urlencoded %2F characters.
On 24/02/2006, at 10:31 AM, Dan Rossi wrote:
Continueing on my prior problem, Ive discovered that base64_encode adds forward slashes in its encoded string, when its urlencoded it becomes something like /feeds/UmFuZG9tSVZd%2FMChU7sMQqdUi%2FrgYHD7 mod_rewrite doesnt seem to like the %2F in the string and fails with a 404 as it doesnt get a match using RewriteRule ^feeds/(.*)$ /refer.php?$1 [L,NE] What should i do ? Should i replace the / with a different character then convert it back later ?