Default Redirection?

Phoca SEF - redirect extension for Joomla! CMS
savvasha
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 09 Aug 2008, 17:08

Default Redirection?

Post by savvasha »

Hello there!

Congrats for this very usefull component!

I wanted to ask if there is possible to add an option for a default redirection of a 404 when there isnt a set one.
For example, when someone goes to a 404 page, then he will automatically redirected to my index.php, but if I have set a redirected page to the correct one, then it will follow that.

Thanks,
Savvas
savvasha
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 09 Aug 2008, 17:08

Re: Default Redirection?

Post by savvasha »

Well I found the solution from other forum.

Go to folder /templates/system find and edit error.php and after line 19 add:
<meta HTTP-EQUIV="REFRESH" content="0; url=/">
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Default Redirection?

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
bellatrix
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 06 Apr 2009, 08:00

Re: Default Redirection?

Post by bellatrix »

This way is more elegant (content of error.php):

Code: Select all

<?php
header("HTTP/1.0 404 Not Found");
header('Location: /404.html');
exit;
?>
whrere /404.html is your custom 404 error page
beyondthenet
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 03 Feb 2010, 05:34

Re: Default Redirection?

Post by beyondthenet »

adding <meta HTTP-EQUIV="REFRESH" content="0; url=/"> after line 19 did not work for me.

Is this because I'm using SEF?
Post Reply