CodeIgniter Forums
Not Acceptable! An appropriate representation of the requested resource could not be - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: Not Acceptable! An appropriate representation of the requested resource could not be (/showthread.php?tid=64918)



Not Acceptable! An appropriate representation of the requested resource could not be - danish3621 - 04-11-2016

I have following link 
Code:
<a href="<?=base_url()?>controller/controller_method/<?=$l1."/".$l2?>">

where 
Code:
$l2
 contains Abhishek Amit but when i click on this link instead of getting on next page i get following error message Not Acceptable!

An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security. I have tried using url_encode() but that is also not working. This issue is only on server (shared hosting) it is working properly on wamp server. Please give solution to the above issue



RE: Not Acceptable! An appropriate representation of the requested resource could not be - arma7x - 04-11-2016

<a href="<?=base_url()?>controller/controller_method/<?=$l1."/".$l2?>"> will output? What is $l1 value? Maybe you URL character is disallowed by codeigniter.


RE: Not Acceptable! An appropriate representation of the requested resource could not be - danish3621 - 04-11-2016

(04-11-2016, 07:24 AM)arma7x Wrote: <a href="<?=base_url()?>controller/controller_method/<?=$l1."/".$l2?>"> will output? What is $l1 value? Maybe you URL character is disallowed by codeigniter.

$l1 contains id i.e. 2 and $l2 contains name with space between them i have checked disallowed character but it is not working. Please give any suggestion.


RE: Not Acceptable! An appropriate representation of the requested resource could not be - PaulD - 04-11-2016

And you say your value of L2 is 'Abhishek Amit' but spaces are not allowed in urls. Even if it gets replaced with &nbsp; or %20% these are all prone to cause problems.