Page 1 of 1

Own 404 page

Posted: Sun Dec 30, 2007 12:39 am
by holysjit
Hi,
I want my own 404 error page. I tried to fix it, but I am sure that I must modify the .htaccess file.

A .txt file from my .htaccess file:
http://www.thejokersweblog.nl/myhtaccess.txt

When I type a URL like this www.mywebsite.com/fdjkdjksa It wil go to my root, www.mywebsite.com

How to solve?

Re: Own 404 page

Posted: Sun Dec 30, 2007 1:01 am
by garvinhicking
Hi!

You can only achieve this by:

1. Turning off URL Rewriting, or

2. Editing your content.tpl template and adding something like:

Code: Select all

{if $view == '404'}
This page was not found!
{/if}
You cannot use a custom 404 file through access, because that would make s9y's URL rewriting no longer work.

Regards,
Garvin

Posted: Sun Dec 30, 2007 1:05 am
by Don Chambers

Re: Own 404 page

Posted: Fri Feb 27, 2009 8:42 pm
by serotonic
Thanks, Garvin, the 2. option worked simply perfect for me!

(Hint: To exclude regular entries from your custom 404 page, simply move the original content.tpl content into the query:)

Code: Select all

{if $view == '404'}
  This page was not found!
{else}
  – original content.tpl content –
{/if}