apache - Php encrypt url -


i need , using codeigniter php url encryption,

i use default codeigniter encryption class , without changing configuration,

but when encrypt url show me error

"object not found , request url not found on server"

the way encrypt url

$e_email_app = $this->encryption->encrypt($email_app); $e_email_app = urlencode($e_email_app); $newurl = base_url()."job_applicant/fill_data/".$e_email_app; 

i enable apache mod_rewrite on http.conf , using virtual host this

<virtualhost *:83>     serveradmin 192.168.77.204:83     documentroot "c:/xampp/htdocs/vacancy/public"     <directory "c:/xampp/htdocs/vacancy/public">         options indexes followsymlinks includes execcgi         allowoverride         order allow,deny         allow     </directory>     errorlog "logs/dummy-host2.example.com-error.log"     customlog "logs/dummy-host2.example.com-access.log" common </virtualhost> 

and .htacess

rewriteengine on

rewritecond %{script_filename} !-d rewritecond %{script_filename} !-f rewritecond $1 !^(index\.php|css|images|robots\.txt) rewriterule ^(.*)$ ./index.php/$1 [l] 

what should ? change encryption algorithm ? please help..

@george sazanovich : thx advise , no problem codeigniter, because fail success , , had setup encryption key

example success : http://192.168.77.204:83/job_applicant/fill_data/5325d49c38a855e9f64a0cf0c0c9ae84ff8bb0f38a36253ef08f5359281e1208d0a6550a276e6ca89be70bb5b782000aeded81d3375106225f59b15c8895d3bcfhj8y8xdztaxoxh1laxhir5qkljoopna1wkdm5eelinp8ga7nnad5zvm607ll%2bid

example fail : http://192.168.77.204:83/job_applicant/fill_data/321ad7709eb97a6a5d72d6a53b40a263a8d676ad8a1cdee72c5440a1cccb94c97c4bc50b8f7aee909a3d65d75e61a86cff87fba66e0a8adb5ec8529ee4a1c482bh9rv7%2fgubenefc1xxxepvwx%2fan2er6uxubqfhcpreq%3d

maybe apache url configuration ?

seems you're trying use reserved name ci_controller

$newurl = base_url()."controller/method/".$e_email_app; 

or edited question , have real name controller , method? also, please, check encryption success:

$email_app = "test string"; $newurl = base_url("controller/method/".urlencode($this->encryption->encode($email_app))); $decoded = $this->encryption->decode(urldecode($newurl)); echo $decoded; // must "test string" after base_url() 

and 1 more: using encryption library must set encyption key @ config file (application/config/config.php -> $config['encryption_key']).

if ok there's 1 reason break script: apache/codeigniter trims part of url. easiest way check - view what's recieved @ controller:

 /* controller (for example mymail) defenition here */  // here's http://domain.com/mymail/mycheck/  public function mycheck($param){    var_dump($param);  } 

also, base_url() accepts param,

base_url().'test/param'; equal base_url('test/param');

edit

i've checked string , seems illegal post "%2f" @ get. problem in illegal characters @ encoded string (you can try use %2f encoded string , it'll crush app).

update

%2f urldecoded / browser (such %20 (whitespace). browser thinks request /controller/method/_encoded_string_/_part_after_%2f_


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -