I have a site that's being ported to ExpressionEngine as a temporary stopgap while a longer term strategy is worked out. The issue is that there are URLs in Google (and the wild) that have "bad" query strings from the previous (Java) build so when a user visits a URL from the old site they get a generic "Invalid GET Data" error.

Is there a way to allow for those characters in an ExpressionEngine URL?

  • What version of EE is the site running? Dec 18, 2012 at 21:07
  • It's 2.5.2 (since 2.5.3 is so damn buggy!)
    – Eric Lamb
    Dec 18, 2012 at 21:24
  • I wish they would just remove this pointless error. EE shouldn't fall apart when given perfectly valid query strings. Dec 18, 2012 at 23:20

2 Answers 2


You can enable specific characters by going to your EE config/config.php file.

Find the permitted_uri_chars config variable.

Here is the default:

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

Additionally, you may want to take a look at the enable_query_strings config too. You want to change it to:

$config['enable_query_strings'] = TRUE;

In addition to what Justin recommends, open up system/expressionengine/core/EE_Input.php, and find the preg_match() call at the end of the filter_get_data() function. Any semi-colons or question marks (encoded) in your GET variables will cause you to be filtered.

Think about security before you edit this function, but I have found it to be necessary at times also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.