Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8584119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:41:50+00:00 2026-06-11T21:41:50+00:00

The URI you submitted has disallowed characters. How do I intercept this error? Is

  • 0

The URI you submitted has disallowed characters.

How do I intercept this error? Is their a callback_ function? This error occurs when I try to use an = in the URL. E.g. I put 1=1 — I get this this error. Instead of the error page I want to redirect('main/cate/page');

How do I catch this error and redirect instead of displaying “An error was encountered page”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:41:51+00:00Added an answer on June 11, 2026 at 9:41 pm

    Looks like the error is being thrown in system/core/URI.php. Luckily, you can extend core classes. Create a file in application/core called MY_URI.php and override the function:

    class MY_URI extends CI_URI{
        function __construct(){
            parent::__construct();
        }
        function _filter_uri($str){
            if ($str != '' && $this->config->item('permitted_uri_chars') != '' && $this->config->item('enable_query_strings') == FALSE)
            {
                // preg_quote() in PHP 5.3 escapes -, so the str_replace() and addition of - to preg_quote() is to maintain backwards
                // compatibility as many are unaware of how characters in the permitted_uri_chars will be parsed as a regex pattern
                if ( ! preg_match("|^[".str_replace(array('\\-', '\-'), '-', preg_quote($this->config->item('permitted_uri_chars'), '-'))."]+$|i", $str))
                {
                    redirect('main/cate/page');
                }
            }
    
            // Convert programatic characters to entities
            $bad    = array('$',        '(',        ')',        '%28',      '%29');
            $good   = array('$',    '(',    ')',    '(',    ')');
    
            return str_replace($bad, $good, $str);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed the Uri.Builder in this answer And I wondered if I can use
I got this URL: http://twitternieuws.com/class/function/ID?oauth_token=xxxxx&oauth_verifier=xxxxx And I keep getting errors like The page you
Are URI/URLs escaped in CI when used like so? function foo($url_arg) $this->input->get('foo');
RewriteEngine on RewriteCond %{REQUEST_URI} !^/index\.php RewriteRule ^(.*)$ index.php?q=$1 [L] This should rewrite any url
I have: String uri = @drawable/myresource.png; How can I load that in ImageView? this.setImageDrawable?
When the document(uri) function is used to load another document within the XSLT, where
I've recently refactored an existing CodeIgniter application to use url segments instead of query
I want all URI to route to default_controller/(:any) for example if the url looks
How can push a URI like this in CodeIgniter (1.7.1 currently): example.com/seg1/seg2/seg3/seg4/ or example.com/seg1/seg2/
Parse error: syntax error, unexpected T_ELSE <?php require_once('config.php'); //error_reporting(0); if (isset($_POST['submitted'])) { $username =$_POST['username'];

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.