In Joomla 1.0 we used the function mosReturn to change the current location of our site to any other url. In Joomla 1.5 the function mosReturn does not exist anymore and here we describe the new way of redirect our site to other url.

This is very easy once you know how to redirect Joomla! 1.5. The code below explains by itself.

<?php
  # Be sure that the variable $mainframe is accessible
  global $mainframe;

  # Let Joomla handle the destination url
  $return = JRoute::_('index.php?option=com_option');

  # Perform the redirection. Note that the Redirection Message
  # will be displayed in the destination url if you are
  # redirecting within the same Joomla site.
  $mainframe->redirect($return, 'Redirection Message');

  # Be sure that this is the end of this execution
  $mainframe->close();
?>