Sunday, December 13, 2009

The URI you submitted has disallowed characters. Code Igniter

While deploying your Code Igniter application in the production server, you may come across with the following error message.

The URI you submitted has disallowed characters.

The problem can be solved with one of the following:

  1. mod_rewrite problem: The mod_rewrite might be the problem for this. Get help form your hosting provider to enable mod_rewrite. In my case, our hosting provider is networksolutions.com. The server environment is FastCGI. They informed us that by default the mod_rewrite will be enabled. In order to use in your application, we need to add
    RewriteBase URL-path
    in our .htaccess file.

    RewriteEngine on
    # If your application is in the home directory
    RewriteBase /
    #Followed by your application specific rules

    In case of deploying in a sub-directories the .htaccess file should have

    RewriteEngine on
    # If your application is in the sub-directory
    RewriteBase /myfolder



  2. The $config['permitted_uri_chars'] configuration variable problem. To resolve this check this url.

No comments: