1

I had issue of @ which I added in $config['permitted_uri_chars'] as you can see below:

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_@\-';

BUt here is my URL

http://mydomain.com/awarenessroom/facebook_image_share/aHR0cDovL2Rldi5lanVpY3lzb2x1dGlvbnMuY29tL3Jla2xhaW1wYWtpc3Rhbi5jb20vdXBsb2Fkcy9hd2FyZW5lc3Nfcm9vbS9pbWFnZXMvOTEwNzA4ODI3VG9yIERheSBaYW5qZWVyLmpwZw==

and it says "The URI you submitted has disallowed characters.", even if I add = in config, still not working. Can anybody let me know what is required exactly by CI in config to get resolved for URI to be working?

Manuel Allenspach
  • 12,467
  • 14
  • 54
  • 76
Umer
  • 133
  • 2
  • 11

3 Answers3

6

As per your info you are using base64_encode so this i will suggest to you because i am following the same in my web application

$encode_string = "google.com";

$result = rtrim(base64_encode($encode_string ),'=');

$decoded_string = base64_decode($result);
Venkata Krishna
  • 4,287
  • 6
  • 30
  • 53
1

Please use url_encode(base64_encode(string)) and then decode it. It will help you for sure.

RobC
  • 22,977
  • 20
  • 73
  • 80
Nilesh Kumar
  • 370
  • 2
  • 3
  • 16
-1

use url_title() function

from this linkl http://ellislab.com/codeigniter/user-guide/helpers/url_helper.html

Himanshu Pandey
  • 1,250
  • 2
  • 23
  • 38