Wednesday 12 November 2003 12:14:49 am
In response to myself: I have created a temporary solution/hack that does the job: In my .htaccess i have: RewriteRule !(^/?user/?.*$|^/?admin/?.*$|\.(gif|css|jpe?g|png|js|asf|avi|wmv|swf|xsl|jar|html))$ index.php RewriteRule ^/?(admin|user)/?(.*)$ index.php/$1/$2 This effectively removes the index.php from the URLs. Next to remove the 'index.php' from the links within the templates i created a template operator called 'ezniceurl', this replaces the 'ezurl' operator. The code from the modify function in that class is:
function modify( &$tpl, &$operatorName, &$operatorParameters, &$rootNamespace, &$currentNamespace, &$operatorValue, &$namedParameters )
{
require_once('lib/ezutils/classes/ezini.php'); require_once('lib/ezutils/classes/ezsys.php');
$ini = eZINI::instance(); eZSys::init( $ini );
// This siteAccessName eg: 'user' or 'admin'
$siteAccessName = $GLOBALS['eZCurrentAccess']['name'];
// append a separator if needed
if(substr($siteAccessName,-1)!=eZSys::FileSeparator() and $operatorValue[0]!=eZSys::FileSeparator()) $siteAccessName .= eZSys::FileSeparator();
$operatorValue = eZSys::wwwDir() .
eZSys::FileSeparator().
$siteAccessName .
$operatorValue; } (To find out how to make an operator check out the ones in the contributions section) Very simple. It just appends the current siteAccess name to the ezroot value. I am still not convinced this is a usefull solution, but for time being I am going to run with it, for lack of a better solution.
Regards, Lachy
|