We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Query String Oddness

Development and Programming

Mythic's avatar
Mythic
41 posts
14 years ago
Mythic's avatar Mythic

Many of Google’s api’s are dependent upon query string formatting that EE does not appear to be tolerant of. I’m curious how people are working around this.

A little background - I have removed “index.php” with mod_rewrite and, therefore, am not forcing query strings.

Strangely, passing a single parameter in a query string causes a 404. Example: example.com/products/music/?info=foo

Passing more than one parameter separated by the ampersand DOES NOT cause a 404. Example: example.com/products/music/?info=foo&more=bar

I’m just hoping to hear how the rest of you are working with traditional query strings in an EE site.

       
the3mus1can's avatar
the3mus1can
426 posts
14 years ago
the3mus1can's avatar the3mus1can

Can you post the index.php rewriting portion of your .htaccess file and what it the $config[‘uri_protocal’] set to in your system/expressionengine/config/config.php file? Assuming you are on EE2.

       
Mythic's avatar
Mythic
41 posts
14 years ago
Mythic's avatar Mythic

Yep, I’m using EE2.

.htaccess:

RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5})$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^(experience|partners|preview|industry|images|system|themes|public|sIFR|favicon.ico|robots.txt|index.php) [NC] RewriteRule ^(.*)$ /index.php/$1 [L]

config.php:

$config[‘uri_protocol’] = ‘AUTO’;

Thanks

       
Mythic's avatar
Mythic
41 posts
14 years ago
Mythic's avatar Mythic

the3mus1can, per your question, I changed uri_protocol to ‘PATH_INFO’ and it seems to correct the “issue” on my local apache server. Can you shed some light on this?

       
the3mus1can's avatar
the3mus1can
426 posts
14 years ago
the3mus1can's avatar the3mus1can

If you do:

echo '<pre>';
var_dump($_SERVER);
echo '</pre>

<p>’;
</pre>

You can see where the different uri_protocols are looking for the data. Whether or not you can use REQUEST_URI or PATH_INFO or AUTO is largely dependent on your server configuration.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.