Joomla website is getting 303 redirect loop -


my website getting 303 redirect loop on main page. gives me error when trying view site "the webpage has redirect loop", of time loads fine. but, 303 redirect doesn't seo. i'm running joomla 3.2.3 zo2 framework. used firefox live http headers tool , shows:

http/1.1 303 see other date: sat, 19 apr 2014 06:42:44 gmt server: apache mod_fcgid/2.3.10-dev x-powered-by: php/5.4.26 set-cookie: 81f5073a1f9d10dc244e07c98216335e=hb7mb5k3v0vftstcgtdbonikq6; path=/;         httponly location: / cache-control: max-age=600 expires: sat, 19 apr 2014 06:52:44 gmt content-length: 0 keep-alive: timeout=5 connection: keep-alive 

i went through , disable every plugin in joomla 1 @ time , when disable zo2 framework plugin 303 redirect went away. i've asked on forums , haven't been able me. so, searched through of files in zo2 plugin directory word redirect , found.

these 2 in site.megamenu.js

!function ($) {     $(document).ready(function ($) {         // when clicking on menu         redirect();         var duration = 0;         var $parent = $('.zo2-megamenu');         var hover_type = $parent.data('hover');         if ($parent.data('duration')) {             duration = $parent.data('duration');         }  function redirect() {     $('.dropdown-toggle').on('click',function(e){         if($(this).parent().hasclass('open') && this.href && this.href != '#'){             window.location.href = this.href;             e.preventdefault();         }     }); } 

i have other website running on server using same .htaccess , php.ini files don't think problem, because not getting redirect. appreciate this. website http://www.betterfreestuff.com

/**  * zo2 framework (http://zo2framework.org)  *  * @link     http://github.com/aploss/zo2  * @package  zo2  * @author   hiepvu  * @copyright  copyright ( c ) 2008 - 2013 apl solutions  * @license  http://www.gnu.org/licenses/gpl-2.0.html gnu/gplv2 or later  */  !function ($) {     $(document).ready(function ($) {         // when clicking on menu         redirect();         var duration = 0;         var $parent = $('.zo2-megamenu');         var hover_type = $parent.data('hover');         if ($parent.data('duration')) {             duration = $parent.data('duration');         }          if (duration && (hover_type == 'hover')) {             var timeout = duration ? duration + 50 : 500;             $('.nav > li, li.mega').hover(                 function(e) {                     onmousein(this, timeout);                 }                 ,                 function (e) {                     onmouseout(this);                 }             );         } else if (hover_type == 'click') {              $('.mega-nav').find('.dropdown-submenu').hover(                 function(e) {                     onmousein(this, 100);                 }                 ,                 function (e) {                     onmouseout(this);                 }              );          }         // first li tag         function redirect() {             $('.dropdown-toggle').on('click',function(e){                 if($(this).parent().hasclass('open') && this.href && this.href != '#'){                     window.location.href = this.href;                     e.preventdefault();                 }             });         }         function onmousein (e, timeout) {              var $this = $(e);             if ($this.hasclass('mega')) {                 $this.addclass ('hovering');                 cleartimeout ($this.data('hovertime'));                 $this.data('hovertime',                     settimeout(function(){$this.removeclass ('hovering')}, timeout));                  cleartimeout ($this.data('hovertime'));                 $this.data('hovertime',                     settimeout(function(){$this.addclass ('open')}, 100));             } else {                 cleartimeout($this.data('hovertime'));                 $this.data('hovertime',                     settimeout(function () {                         $this.addclass('open')                     }, 100));             }          }          function onmouseout (e) {             var $this = $(e);             cleartimeout($this.data('hovertime'));             $this.data('hovertime',                 settimeout(function () {                     $this.removeclass('open')                 }, 100));          }          /** begin: off canvas menu **/         var showoffcanvasmenu = function () {             var $offcanvas = $('.offcanvas');             var $body = $('body');             var $wrapper = $('.wrapper');              $body.addclass('overflow-hidden');             $wrapper.addclass('offcanvas-push');              var $overlay = $('<div />').addclass('offcanvas-overlay').appendto('body');             $overlay.css({                 top:0,                 right:0,                 bottom:0             }).fadein();              $overlay.click(function() {                 $body.removeclass('overflow-hidden');                 $wrapper.removeclass('offcanvas-push');                 $offcanvas.removeclass('active');                 $('.offcanvas-overlay').remove();             });         };         var hideoffcanvasmenu = function () {             var $body = $('body');             var $wrapper = $('.wrapper');             var $offcanvas = $('.offcanvas');              $body.removeclass('overflow-hidden');             $wrapper.removeclass('offcanvas-push');             $offcanvas.removeclass('active');             $('.offcanvas-overlay').remove();         };         $('[data-toggle=offcanvas]').click(function() {             var $offcanvas = $('.offcanvas');             $offcanvas.toggleclass('active');              if ($offcanvas.hasclass('active')) {                 showoffcanvasmenu();             }             else {                 hideoffcanvasmenu();             }         });          $('body').on('click', '.sidebar-nav a', function() {             if (!$(this).hasclass('nav-oc-toggle')) hideoffcanvasmenu();         });          $('body').on('click', '.sidebar-close', function() {             hideoffcanvasmenu();         });          // new off canvas submenu         $('body').on('click', '.nav-oc-toggle', function() {             var $this = $(this);             var $parent = $this.closest('.nav-parent');              if ($parent.find('> .submenu').hasclass('in')) $this.removeclass('icon-caret-up').addclass('icon-caret-down');             else $this.removeclass('icon-caret-down').addclass('icon-caret-up');         });         /** end: off canvas menu **/     }); }(jquery); 

i searched 303 in of files on server , these files came redirect statements.

cms.php

public function redirect($url, $moved = false)  {     // handle b/c checking if message passed method, removed @ 4.0 if (func_num_args() > 1) {     $args = func_get_args();      /*      * checks on $args array, values below correspond legacy redirect() method      *      * $args[0] = $url      * $args[1] = message enqueue      * $args[2] = message type      * $args[3] = $moved      */     if (isset($args[1]) && !empty($args[1]) && !is_bool($args[1]))     {         // log passing message function deprecated         jlog::add(             'passing message , message type jfactory::getapplication()->redirect() deprecated. '             . 'please set message via jfactory::getapplication()->enqueuemessage() prior calling redirect().',             jlog::warning,             'deprecated'         );          $message = $args[1];          // set message type if present         if (isset($args[2]) && !empty($args[2]))         {             $type = $args[2];         }         else         {             $type = null;         }          // enqueue message         $this->enqueuemessage($message, $type);          // reset $moved variable         $moved = isset($args[3]) ? (boolean) $args[3] : false;     } } 

application.php

public function redirect($url, $msg = '', $msgtype = 'message', $moved = false)     {         // check relative internal links.         if (preg_match('#^index2?\.php#', $url))         {             $url = juri::base() . $url;         }          // strip out line breaks.         $url = preg_split("/[\r\n]/", $url);         $url = $url[0];          /*          * if don't start http need fix before proceed.          * validly start else (e.g. ftp), though          * unlikely , isn't supported api.          */         if (!preg_match('#^http#i', $url))         {             $uri = juri::getinstance();             $prefix = $uri->tostring(array('scheme', 'user', 'pass', 'host', 'port'));              if ($url[0] == '/')             {                 // need prefix since have path relative root.                 $url = $prefix . $url;             }             else             {                 // it's relative now, lets add that.                 $parts = explode('/', $uri->tostring(array('path')));                 array_pop($parts);                 $path = implode('/', $parts) . '/';                 $url = $prefix . $path . $url;             }         }          // if message exists, enqueue it.         if (trim($msg))         {             $this->enqueuemessage($msg, $msgtype);         }          // persist messages if exist.         if (count($this->_messagequeue))         {             $session = jfactory::getsession();             $session->set('application.queue', $this->_messagequeue);         }          // if headers have been sent, cannot send additional location header         // output javascript redirect statement.         if (headers_sent())         {             echo "<script>document.location.href='" . str_replace("'", "&apos;", $url) . "';</script>\n";         }         else         {             $document = jfactory::getdocument();              jimport('phputf8.utils.ascii');              if (($this->client->engine == japplicationwebclient::trident) && !utf8_is_ascii($url))             {                 // msie type browser and/or server cause issues when url contains utf8 character,so use javascript redirect method                 echo '<html><head><meta http-equiv="content-type" content="text/html; charset=' . $document->getcharset() . '" />'                     . '<script>document.location.href=\'' . str_replace("'", "&apos;", $url) . '\';</script></head></html>';             }             else             {                 // other browsers, use more efficient http header method                 header($moved ? 'http/1.1 301 moved permanently' : 'http/1.1 303 see other');                 header('location: ' . $url);                 header('content-type: text/html; charset=' . $document->getcharset());             }         }          $this->close();     } 

web.php

public function redirect($url, $moved = false) {     // import library dependencies.     jimport('phputf8.utils.ascii');      // check relative internal links.     if (preg_match('#^index\.php#', $url))     {         // changed "$this->get('uri.base.full') . $url" due inability run system tests original code         $url = juri::base() . $url;     }      // perform basic sanity check make sure don't have crlf garbage.     $url = preg_split("/[\r\n]/", $url);     $url = $url[0];      /*      * here need check , see if url relative or absolute.  essentially, need      * prepend url our base url proper redirect.  rudimentary way looking      * @ check whether or not url string has valid scheme or not.      */     if (!preg_match('#^[a-z]+\://#i', $url))     {         // juri instance requested uri.         $uri = juri::getinstance($this->get('uri.request'));          // base url prepend requested uri.         $prefix = $uri->tostring(array('scheme', 'user', 'pass', 'host', 'port'));          // need prefix since have path relative root.         if ($url[0] == '/')         {             $url = $prefix . $url;         }         // it's relative now, lets add that.         else         {             $parts = explode('/', $uri->tostring(array('path')));             array_pop($parts);             $path = implode('/', $parts) . '/';             $url = $prefix . $path . $url;         }     }      // if headers have been sent need send redirect statement via javascript.     if ($this->checkheaderssent())     {         echo "<script>document.location.href='" . str_replace("'", "&apos;", $url) . "';</script>\n";     }     else     {         // have use javascript redirect here because msie doesn't play nice utf-8 urls.         if (($this->client->engine == japplicationwebclient::trident) && !utf8_is_ascii($url))         {             $html = '<html><head>';             $html .= '<meta http-equiv="content-type" content="text/html; charset=' . $this->charset . '" />';             $html .= '<script>document.location.href=\'' . str_replace("'", "&apos;", $url) . '\';</script>';             $html .= '</head><body></body></html>';              echo $html;         }         else         {             // other cases use more efficient http header redirection.             $this->header($moved ? 'http/1.1 301 moved permanently' : 'http/1.1 303 see other');             $this->header('location: ' . $url);             $this->header('content-type: text/html; charset=' . $this->charset);         }     } 


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -