开发者

Redirect 500 error page to some other page in joomla

开发者 https://www.devze.com 2023-02-15 16:25 出处:网络
I am using joomla 1.5,I am having some of page with 500.But I want to redirect those page to new page is this possible. below I have given the example.

I am using joomla 1.5,I am having some of page with 500.But I want to redirect those page to new page is this possible. below I have given the example.

Old page http://example.com/oldp开发者_如何学Cag [500 eror page]

I want to redirect the above url to new working page

New page http://example.com/newpage

Please advise me..

Regards, SurezRam


go to folder location: yoursite/template/system/ and modify the error.php, put following redirect code after defined( '_JEXEC' ) or die( 'Restricted access' );

header("location: http://example.com/newpage");
exit;


add the below code to your .htaccess file in the root of the joomla installation if you can't find one create one.

# CUSTOM ERROR PAGES
 ErrorDocument 400 URL/error/403.shtml
 ErrorDocument 401 URL/error/403.shtml
 ErrorDocument 403 URL/error/403.shtml
 ErrorDocument 404 URL/error/404.shtml
 ErrorDocument 500 URL/error/500.shtml
# END CUSTOM ERROR PAGES

where the url is the url of the site. I have put respective error files accordingly. for internal server error [500] it would redirect to 500.shtml file inside the error folder. Shtml is nothing but html file with renamed extension.


You can use the solution in the joomla documentation. This is usable for any error code.

http://docs.joomla.org/Creating_a_Custom_404_Error_Page

For 1.6 i posted a fix here on this stackoverflow question :

How do I create a custom error page (404) for Joomla 1.6?

This fix would also be necessary for kumarans solution.


thanks for this share , we can also use joomla redirect for more detail you can get it from here

http://webobserve.blogspot.com/2011/03/redirect-error-page-to-some-other-page_09.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号