ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Query Parameters Being Stripped

March 03, 2011 4:58pm

Subscribe [1]
  • #1 / Mar 03, 2011 4:58pm

    brianhoffman

    16 posts

    In an effort to integrate our Google site search with Pardot, I’m trying to get our search page to work with query string parameters. Unfortunately, EE seems to be stripping anything in the URL that starts with a question mark. So, for example, the URL

    http://www.ourdomain.com/search/results/?q=billing

    will return segment_3 as empty. I’ve used the config file editor to allow the question mark in $config[‘permitted_uri_chars’], but that didn’t help. I thought maybe EE automatically parsed those variables for me, but I couldn’t find any way in the documentation to access it.

    How do I fix this?

    Thanks,
    Brian

  • #2 / Mar 04, 2011 9:02am

    Ingmar

    29245 posts

    What version and build of EE are you using? Are you removing index.php from your URLs?

  • #3 / Mar 07, 2011 11:49am

    brianhoffman

    16 posts

    We’re using version 2.1.3 of EE and yes, we are removing index.php from our URLs.

  • #4 / Mar 07, 2011 4:47pm

    Ingmar

    29245 posts

    All EE requests are run through index.php (even if you’re hiding it via mod_rewrite):

    http://example.com/index.php/foo/bar

    On most serves the ? need not be explicit, but “/foo/bar” is already a query string, equivalent to

    http://example.com/index.php?/foo/bar

    I am afraid you can’t use another question mark in your URLs. You can use this, however:

    http://example.com/index.php?/blog/&foo=bar
    http://example.com/index.php?/blog/&q=billing

    Take a look at this thread which discusses the issue at length.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases