Question

[Solved] Codeigniter: URI you submitted has disallowed characters

My URL is:

https://example.com/c3dlZXRfcmFqdmk5MUBob3RtYWlsLmNvbQ=

When I remove = then it works fine.

I have this in config.php

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

Error:

The URI you submitted has disallowed characters.

How can I allow = or == signs in URI?

I have tried it by changing this:

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-='; // added = sign at the end

Solution #1:

In /project-folder-name/application/config/config.php configure this variable:

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

it also works for @ character

Respondent: Angel Doza

Solution #2:

change in config.php file

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

and

$config['enable_query_strings'] = TRUE;

It works for me. Try it yourself!

Respondent: Abhijeet Navgire

Solution #3:

In CI open directory at
project-folder-name/application/config/config.php and configure the variable $config['permitted_uri_chars']:

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

This will work for all special characters

Respondent: amba patel

Solution #4:

first of all you have to encode your id that is pass in url, then in controller you have to decode the id.
view:

<a href="<?php echo base_url()?>Cinvoice/imei_invoice/<?php echo base64_encode($invoice_list['invoice_id']); ?>" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="left" title="Final Invoice By Ware House">Primary Order</a>

Controller:

when you call fuction that is in library

$content = $CI->linvoice->get_imei(base64_decode($invoice_id)); 
Respondent: mohammd salman

Solution #5:

i have got this in address bar

O9SPVKocvz6Ph7mT+ulXzMhYV2VDao5gfL9BWtdMKdOBL4PnSLc5E8nIBYnj4hdTpaBUUgFmMX+3X24CfzZ3Rw==

change in config.php file

use this

$config[‘permitted_uri_chars’] = ‘a-z 0-9~%.:_-=+’;

its working fine

Respondent: Deepu Bhasin

Solution #6:

In my CI version 3.11 i solved by this :

in application/config/config.php i changed

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

to

$config['permitted_uri_chars'] = '';

and problem solved.

My URL was something like this : example.com/product/45/kotlin_toturial(by_avasam.ir) _in_99_lessons

.

Respondent: sam nikzad

Solution #7:

I have changed the config.php file

$config[‘permitted_uri_chars’] = ‘a-z 0-9~%.:_-=&’;

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

and

$config['enable_query_strings'] = TRUE;

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy