Part of the EllisLab Network
x
 
Create New Page
 View Previous Changes    ( Last updated by pleaseremove )

Calling page chunks from SSI

In integrating some static content with a dynamic site I was trying to use SSI syntax in Apache to include the view returned from a method in a class.

After a lot of hunting around it turned out to be the routing part of CodeIgnitor which stopped this working.

The fix is to open System/Libraries/URI.php and add the following to the start of the method: _parse_request_uri

if(isset($_SERVER[‘REDIRECT_URL’]) && !empty($_SERVER[‘REDIRECT_URL’]) && $_SERVER[‘SERVER_PROTOCOL’]==“INCLUDED”)
{
  $_SERVER[‘REQUEST_URI’] = $_SERVER[‘REDIRECT_URL’];
}