I posted this solution on the ExpressionEngine Stack Exchange website, but in a nutshell we used a shared hosting environment that was used to use FastCGI, t modify any CGI or PHP configuration.
In an attempt to create the $_SERVER['PATH_INFO'] variable, I myself applied this three-step "user" approach:
- First, in
ExpressionEngine > CP Home > Admin > System Administration > Output And Debugging , I set the Force URL strings to None . - Further, as mentioned in previous answers, I changed the
.htaccess directive from RewriteRule ^(.*)$ /index.php/$1 [L,QSA] to RewriteRule ^(.*)$ /index.php?/$1 [L,QSA] (added after index.php). Finally, I added this piece of custom PHP code to the top of the root index.php file of the site to "force" the $_SERVER['PATH_INFO'] variable into its exact existence:
<?php $path = $_SERVER['REQUEST_URI']; $pos = strpos($path, '?'); if ($pos !== false) $path = substr($path, 0, $pos); $_SERVER['PATH_INFO'] = $path;
Hope this helps someone! I really pulled my hair out trying to find some more elegant solutions!
source share