Allowing all base64 encoding characters in URI |
[eluser]Gewa[/eluser]
Hi . Actually I need to encode all external links on website to some string like blablablabladasdas4124124125 then use mysite.com/redirect/goto/blablablabladasdas4124124125 link then to decode it in goto controller and make redirect. I saw the base64 is one solution but some characters, i guess = one cause not allowed error. Any help please... Or help me to fix to allow all alphabet of base64 encoding or other encoding function??? Please help
[eluser]Xeoncross[/eluser]
Base 64 is the way to go - I use it to encode a $return_to variable so that after a login or something I can send the user back to wherever they were before I asked them to login. Code: //Construct current URL for functions that "return_to"
[eluser]Gewa[/eluser]
Yes I understand. that the base64 is the way to do it but for example it will couse NOT ALLOWED CHARACTERS problem....
[eluser]Gewa[/eluser]
Code: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_-'; what to add to above chars to allow all chars from base64 alphabet?
[eluser]pistolPete[/eluser]
The base64 alphabet is shown here: http://www.garykessler.net/library/base64.html You need to add +/=.
[eluser]Gewa[/eluser]
After I added what you said Code: A PHP Error was encountered
[eluser]pistolPete[/eluser]
Which CI version are you using? How does your permitted_uri_chars now look exactly? I just tried it using the following line, and it's working: Code: $config['permitted_uri_chars'] = '+=\a-z 0-9~%.:_-';
[eluser]Gewa[/eluser]
version is 1.7.1 What you gave worked. Thank you. Sometimes I am so dude in PHP... ![]() |
Welcome Guest, Not a member yet? Register Sign In |