2011-03-08 172 views

回答

3

轉到文件夾位置:yoursite/template/system /和modif y中的error.php, 放下面重定向代碼後defined('_JEXEC') or die('Restricted access');

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

將edit.php複製到當前模板目錄(比如說rhuk_milkyway)並在其中插入重定向代碼可能會稍微好一點 – yitwail 2012-02-18 02:48:37

1

下面的代碼添加到在安裝Joomla的根你的.htaccess文件如果你不能找到一個創建一個。

# 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 

其中URL是網站的URL。 我已經相應地放置了相應的錯誤文件。對於內部服務器錯誤[500],它將重定向到錯誤文件夾中的500.shtml文件。 Shtml不過是重命名擴展名的html文件。

+0

我試過了(我只是想顯示主頁,/或/index.php),它只是最終顯示joomla的醜陋的'查看未找到'頁面。我必須將完整的URL放在.htaccess文件(http://server.com/)中;那工作。 – Jimmy 2012-05-09 15:27:56