When setting the Back-end to force use SSL, it will do that, but won't let you log in.
You will go in an endless login cycle.
You will go in an endless login cycle.
To solve this you will need to dig in the code and change a few lines.
(Credit to original poster: John-Paul Takats)
Change the file ../libraries/joomla/environment/uri.php
if(trim($live_site) != '') {
$uri =& JURI::getInstance($live_site);
$base['prefix'] = $uri->toString( array('scheme', 'host', 'port'));
$base['path'] = rtrim($uri->toString( array('path')), '/\\');
if(JPATH_BASE == JPATH_ADMINISTRATOR) {
$base['path'] .= '/administrator';
}
$uri =& JURI::getInstance($live_site);
$base['prefix'] = $uri->toString( array('scheme', 'host', 'port'));
$base['path'] = rtrim($uri->toString( array('path')), '/\\');
if(JPATH_BASE == JPATH_ADMINISTRATOR) {
$base['path'] .= '/administrator';
}
to
if(trim($live_site) != '') {
$uri =& JURI::getInstance($live_site);
$base['prefix'] = $uri->toString( array('scheme', 'host', 'port'));
$base['path'] = rtrim($uri->toString( array('path')), '/\\');
/*
* John-Paul Takats Fix for SSL login Loop problem
* -----------------------------------------------
*/
if(JPATH_BASE == JPATH_ADMINISTRATOR) {
$force_ssl = $config->getValue('config.force_ssl');
if($force_ssl > 0){
$base['prefix'] = ereg_replace("http://","https//", $base['prefix']);
}
$base['path'] .= '/administrator';
}
$uri =& JURI::getInstance($live_site);
$base['prefix'] = $uri->toString( array('scheme', 'host', 'port'));
$base['path'] = rtrim($uri->toString( array('path')), '/\\');
/*
* John-Paul Takats Fix for SSL login Loop problem
* -----------------------------------------------
*/
if(JPATH_BASE == JPATH_ADMINISTRATOR) {
$force_ssl = $config->getValue('config.force_ssl');
if($force_ssl > 0){
$base['prefix'] = ereg_replace("http://","https//", $base['prefix']);
}
$base['path'] .= '/administrator';
}
Hi,
ReplyDeleteAwesome Post.
Such this post is very informative.
Thanks for sharing with us.
Joomla Web Development Company Bangalore | Joomla Web Development Bangalore | Internet Marketing Company in Bangalore | Joomla Website Developer Bangalore