Changing URI suffix in Joomla when adding child php pages
- by Sleem
I have added a new directory in my joomla website:
http://sitedomain.tld/xxx/
then I have added index.php in that directory
here is the code
define( '_JEXEC', 1 );
define('JPATH_BASE', '..' );
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( '../includes/defines.php' );
require_once ( '../includes/framework.php' );
//JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;
/**
* CREATE THE APPLICATION
*
* NOTE :
*/
$mainframe =& JFactory::getApplication('site');
$template_name = $mainframe->getTemplate();;
$mainframe->initialise();
JPluginHelper::importPlugin('system');
/**
* ROUTE THE APPLICATION
*
* NOTE :
*/
$mainframe->route();
// authorization
$Itemid = JRequest::getInt( 'Itemid');
$mainframe->authorize($Itemid);
// trigger the onAfterRoute events
//JDEBUG ? $_PROFILER->mark('afterRoute') : null;
//$mainframe->triggerEvent('onAfterRoute');
/**
* DISPATCH THE APPLICATION
*
* NOTE :
*/
$option = JRequest::getCmd('option');
//$mainframe->dispatch($option);
// trigger the onAfterDispatch events
//JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
//$mainframe->triggerEvent('onAfterDispatch');
/**
* RENDER THE APPLICATION
*
* NOTE :
*/
$mainframe->render();
/**
* RETURN THE RESPONSE
*/
var_dump($document->getHeadData());
echo JResponse::toString($mainframe->getCfg('gzip'));
sdwdwd
wdwd
When I view this page in the browser, all the dynamic links like CSS, JS and images were suffixed by the /xxx/ path which make them broken !
How can I drop this suffix or how do I change this suffix from /xxx to / to it points to the original files location?
I have tried setting the JDocument::setBase and also tried to play with the JURI object and changed its _path and _uri without any change
Thanks