Magento: Redirect Funktionen

20. August 2010 at 17:42

Die ReDirect Funktionen findet ihr in der Mage_Core_Controller_Varien_Action class.

/* Redirect to certain url  */
_redirectUrl($url)

/* Redirect to certain path */
_redirect($path, $arguments=array())

/* Redirect to success page */
_redirectSuccess($defaultUrl)

/* Redirect to error page */
_redirectError($defaultUrl)

/* Set referer url for redirect in response */
_redirectReferer($defaultUrl=null)

/*  Identify referer url via all accepted methods (HTTP_REFERER, regular or base64-encoded request param) */
_getRefererUrl()

/* Check url to be used as internal */
_isUrlInternal($url)

For redirect URL:
$url = "http://example.com";
Mage::app()->getFrontController()->getResponse()->setRedirect($url);
For redirect with path and arguments:
Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl($path, $arguments));
GD Star Rating
loading...
GD Star Rating
loading...
Magento: Redirect Funktionen, 8.7 out of 10 based on 7 ratings