Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hey guys,
1) So I made a 404.php and placed it in the root of my site.

2) It appears that even without uncommenting the relevant line in the htaccess file, the 404 shows up, which is cool :) (though the docs say you should uncomment this line: #ErrorDocument 404 /404.php)

3) However, if I have the 404 as a couch template, and I click on some random url that generates a 404, it takes me to the admin login page... Is this because of url paths?

I have pasted the content of my 404 page below, I have renamed my couch folder to cms.

Any feedback would be muchos appreciated!

Karen

<?php require_once( 'cms/cms.php' ); ?>

<!DOCTYPE HTML>

<html lang="en">

<head>

<cms:embed "head.html" />

<cms:embed "css.html" />

<cms:embed "js.html" />

</head>

<body>
<div class="wrap">
<cms:embed "header.html" />
<main class="main">
<div class="block-layout block-page">
<div class="block-medium center-element">
<div class="page-content">
<h1>Whoops! Page not found!</h1>
</div> <!-- /page-content -->
</div> <!-- /block-medium -->
</div> <!-- /block-page -->
</main>
</div> <!--wrap-->
<cms:embed "footer.html" />
<noscript><strong>You need Javascript to run this page</strong></noscript>

</body>

</html>
<?php COUCH::invoke(); ?>
Hi Karen,

As mentioned in the docs, there are two kinds of pages that could lead to 404 -
1. Physical pages (e.g. requesting 'blog.php' when there is no such file named 'blog.php' present)
2. Virtual pages i.e. the cloned pages (e.g. requesting 'blog.php?p=15' where, although 'blog.php' *is* present, there is no cloned page with an id of '15').
For the first kind of files, it is the web-server that sends back the 404 while
for the second kind, it is Couch that sends it.

For the web-server to recognize the custom 404 file, we need to uncomment "#ErrorDocument 404 /404.php" in .htaccess.
For Couch, the presence of a file named 404.php in the root is sufficient,

Hope that explains the first point :)

Coming to the login box problem, I think you have not yet registered the 404.php (by manually typing its URL in the addrssbar of your browser and accessing it as *super-admin*). You should see it in the admin-panel's sidebar if it is registered.

Please register it as suggested and, hopefully, you wouldn't be shown the login box any more.

Hope this helps.
Thanks KK.... man, how silly of me... must keep a track of the sillies I make, like not registering a page... thanks so much for the quick response...
3 posts Page 1 of 1