Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 18

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse
Old 27.01.2005, 01:45   #1 (permalink)
Junior Mamber
 
Join Date: Oct 2004
Posts: 39
visions is on a distinguished road
Question Custom 404 pages

Hi all,

We're wondering how to (or if you can) configure Mambo to not display the home page instead of a standard 404 page when a user goes to a broken link?

We'd like to use standard custom shtml error docs; and not have this as part of the Mambo system.

Is this possible??? anyone? If not does 404SEF allow you to create custom error docs??


Any suggestions would be much appreciated Thanks!
visions is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 27.01.2005, 05:11   #2 (permalink)
m2k
Senior Mamber
 
m2k's Avatar
 
Join Date: Sep 2004
Posts: 221
m2k is on a distinguished road
Default Re: Custom 404 pages

Yes, 404SEF supports this. You can genrate your own custom 404 error. It does NOT default to the home page.
m2k is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 27.01.2005, 08:43   #3 (permalink)
Junior Mamber
 
Join Date: Oct 2004
Posts: 39
visions is on a distinguished road
Default Re: Custom 404 pages

Thanks,

We'd prefer to just use the usual shtml docs though; is there any way of configuring Mambo just to ignore 404 errors completely?
visions is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 27.01.2005, 19:59   #4 (permalink)
TVB
Mamber
 
Join Date: Oct 2004
Posts: 62
TVB is on a distinguished road
Default Re: Custom 404 pages

Put the following in your .htaccess file

ErrorDocument 404 /whatever page you want to use
TVB is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 27.01.2005, 21:05   #5 (permalink)
Junior Mamber
 
Join Date: Sep 2004
Posts: 28
JemHadar is on a distinguished road
Default Re: Custom 404 pages

Quote:
Originally Posted by visions
is there any way of configuring Mambo just to ignore 404 errors completely?
I think you have to put:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php

in your .htaccess to do this.
JemHadar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 29.01.2005, 02:48   #6 (permalink)
Junior Mamber
 
Join Date: Oct 2004
Posts: 39
visions is on a distinguished road
Default Re: Custom 404 pages

Doesn't appear to work - it's still displaying the homepage - my .htaccess file looks like this:

Code:
##
# @version $Id: htaccess.txt,v 1.4 2004/09/16 18:27:17 saka Exp $
# @package Mambo_4.5
# @copyright (C) 2000 - 2004 Miro International Pty Ltd
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Mambo is Free Software
##
#
#
#  mod_rewrite in use
#

RewriteEngine On

#  Uncomment following line if your webserver's URL 
#  is not directly related to physival file paths.
#  Update YourMamboDirectory (just / for root)

# RewriteBase /YourMamboDirectory

#
#  Rules
#

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php


ErrorDocument 404 /404.htm
I tried removing the ^ after Rewrite Rule too but it didn't make any difference. Where am I going wrong??

Thanks for your help
visions is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 29.01.2005, 07:12   #7 (permalink)
m2k
Senior Mamber
 
m2k's Avatar
 
Join Date: Sep 2004
Posts: 221
m2k is on a distinguished road
Default Re: Custom 404 pages

In your .htaccess, mod_rewrite is taking precendence over the Errordocument.

Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php

ErrorDocument 404 /404.htm
If you take the time to actually understand these directives, it should be obvious that the Errordocument will NEVER come into affect. Your mod_rewrite prevents this. In plan english the statements are:

if the requested filename is not a valid file and the requested filename is not a valid directory then the filename IS index.php Thus any filename which does not exist will be changed to index.php. The same holds true if the filename is not a valid directory. It will be changed to index.php. Accordingly, the Errordocument is never trigger, because the conditions of the mod_rewrite statemenst have already been meet.
m2k is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 29.01.2005, 10:13   #8 (permalink)
Junior Mamber
 
Join Date: Oct 2004
Posts: 39
visions is on a distinguished road
Default Re: Custom 404 pages

Thankyou so much for taking the time to explain this; as you may have guessed I'm not familar with htaccess commands.

All working fine now; thanks again for your help
visions is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TUTORIAL: How to INTEGRATE Mambo modules into non-MOS static php pages in your site marcnyc Mambo 4.5 'How Do I' Questions 10 28.02.2006 04:23
SEF / Cloaking / Redirect / Custom 404 module idea mkoenigs Mambo 5.0 Wishlist 3 27.11.2004 02:47
Script in Custom Pages headbanger Mambo 4.5 'How Do I' Questions 9 04.08.2004 08:48
News Flash text not showing up on Docman pages gmc100 Mambo 4.5 Bugs 0 20.07.2004 04:05
Mambo and Custom php pages? clayb Mambo 4.5 General Talk 5 14.06.2004 08:53


All times are GMT +2. The time now is 14:48.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.