Skip to content

Calling page chunks from SSI

Derek Jones edited this page Jul 5, 2012 · 2 revisions

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']; }

Clone this wiki locally