plus minus gleich
toggle
toggle

redirect 404 / 301 pages page not found error page in joomla

User Rating: / 0
PoorBest 

In Joomla you will find a default Joomla 404 page. Thus often you might want to redirect those not found pages to some other page or your main site. To do so please follow the steps as below

 

1. Edit error.php file under templates/system/ folder of your Joomla installation.

 

 

2.  Copy this code below immediately following the ### defined( '_JEXEC' ) or die( 'Restricted access' ); ## in your error.php.

## if (($this->error->code) == '404') {
## header('Location: http://www.yourdomain.com/');
## exit;

So the code looks somewhat like this (Ignore "##" signs)

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

if (($this->error->code) == '404') {
header('Location: http://www.yourdomain.com/');
exit;
}

?>

 

This should redirect the 404 not found error page to your main site.

 


 

Add comment


Security code
Refresh

mod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_counter
mod_vvisit_counterToday24
mod_vvisit_counterYesterday134
mod_vvisit_counterThis week451
mod_vvisit_counterLast week794
mod_vvisit_counterThis month1190
mod_vvisit_counterLast month3109
mod_vvisit_counterAll days4558

We have: 1 guests online
Your IP: 38.107.191.90
 , 
Today: Mar 11, 2010
Featured Links:

Gallery

No images

Categories