Posted on: 08/20/04 05:09pm
By: Anonymous (julianna)
Hi.
Right now, my 404.php shows the following:
----------
Not Found
The requested URL /justmetesting404.html was not found on this server.
Apache/1.3.20 Server at www.transient waters.net Port 80
-----------
How do I edit either the 404.php or lib-common.php file to add a hyper-link to my main page? I'm asking because I had my website configured to automatically redirect to the main page, but search engines continue to list obsolete files because they're not hitting a 404 message. However, I want persons to be able to visit my site by simply clicking on a link.
Thanks!
p.s. There isn't actually a space between "transient" and "waters", but it otherwise looks like transien*censored*ers on this board
Editing 404.php?
Posted on: 08/20/04 05:28pm
By: Dirk
What you need to do is tell the Apache webserver to use Geeklog's 404.php instead of its own standard 404 page (which is what you're seeing at the moment).
To do this, create a file named
.htaccess
(note the leading dot) in the directory where the 404.php is and enter this as the content of the file:
ErrorDocument 404 /404.php
This assumes your Geeklog site is installed in the document root, i.e. that you could call up 404.php with the url http://www.example.com/404.php - you'll have to adjust the link to 404.php accordingly if it is somewhere else.
bye, Dirk
Editing 404.php?
Posted on: 09/26/05 02:10am
By: Xmystic
I get:
404 Error
Gee, I've looked everywhere but I can not find http://www.thecableking.com/404.php.
We're sorry, but the file you have requested does not exist. Please feel free to check the main page or the search page to see if you can find what you lost.
Shouldn't the page be the one they tried to access?
And if I put a bogus php page in, I get a blank screen with "No input file" error.
Editing 404.php?
Posted on: 03/07/06 09:50am
By: koalasoft
try to do it as it says aqui but it does not work to me.
my geeklog this in the directory /var/www/html/elsitio/public_html now the .htaccess I have I put in the directory "public_html" or "elsitio"?
Saludos !!
Editing 404.php?
Posted on: 03/07/06 01:50pm
By: koalasoft
some aid?
Editing 404.php?
Posted on: 03/07/06 04:59pm
By: Anonymous (julianna)
1. Check your path/to/geeklog/public_html folder for a file named ".htaccess". If it does not exist, create the file (do not put anything in front of the period).
2. Add the following to the ".htaccess" file:
ErrorDocument 404 /404.php
3. In the language file (in path/to/geeklog/language), edit the following:
# 404.php
$LANG_404 = array(
1 => '404 Error',
2 => 'Gee, I've looked everywhere but I can not find <b>%s</b>.',
3 => "<p>We're sorry, but the file you have requested does not exist. Please feel free to check the <a href="{$_CONF['site_url']}">main page</a> or the <a href="{$_CONF['site_url']}/search.php">search page</a> to see if you can find what you lost."
);
1 is the title, 2 is the first line, and 3 is the second line:
404 Error
Gee, I've looked everywhere but I can not find http://www.geeklog.net/fakefile.php.
We're sorry, but the file you have requested does not exist. Please feel free to check the main page or the search page to see if you can find what you lost.
Editing 404.php?
Posted on: 03/07/06 06:21pm
By: koalasoft
(do not put anything in front of the period).
it excuses, but I do not understand this part !! me can explain ?
Editing 404.php?
Posted on: 03/07/06 06:26pm
By: koalasoft
asi I did it and it shows this to me ...
Not Found
The requested URL /public_html/verde was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Editing 404.php?
Posted on: 03/07/06 06:39pm
By: Anonymous (julianna)
Regarding the ".htaccess" file:
In your path/to/geeklog/public_html folder, you should have [among other files] files named "index.php" and "lib-common.php". In the same folder, you will need a file named ".htaccess". Normally, what is after the "." (for example, "php") is the extension, and what before the "." (for example, "index" or "lib-common") is the file name. for the ".htaccess" file, you essentially have an extension of "htaccess" and no file name.
If this file does not already exist, you will need to create it. In the file, you will need to add the following line:
ErrorDocument 404 /404.php
After adding this code, try to go to a file which does not exist (for example, http://koalasoft.homelinux.net/public_html/testing404.php). If you have done the above correctly, you should get the following:
404 Error
Gee, I've looked everywhere but I can not find http://www.geeklog.net/fakefile.php.
We're sorry, but the file you have requested does not exist. Please feel free to check the main page or the search page to see if you can find what you lost.
Try this first and report back. If you are able to get this to work, we will move to the next step.
Editing 404.php?
Posted on: 03/07/06 06:49pm
By: koalasoft
I create I file .htaccess within my /path/misite/public_html in where this my lib-commond.php, user.php, etc and between a the example that put:
(for example, http://koalasoft.homelinux.net/public_html/testing404.php)
if I did it and he sends east message to me:
Not Found
The requested URL /public_html/testing404.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Editing 404.php?
Posted on: 03/07/06 07:22pm
By: Anonymous (julianna)
Does the ".htaccess" file have the following text in it?
ErrorDocument 404 /404.php
Editing 404.php?
Posted on: 03/07/06 07:27pm
By: koalasoft
yes yes ...
this is contend the my .htaccess
ErrorDocument 404 /404.php
and this in my directory /var/www/html/misitio/public_html/.htaccess
and
and this it is the message that shows[*1]
Editing 404.php?
Posted on: 03/07/06 07:31pm
By: Anonymous (julianna)
Try moving the ".htaccess" file to /var/www/html/misitio/
Editing 404.php?
Posted on: 03/07/06 07:53pm
By: koalasoft
not
Editing 404.php?
Posted on: 03/08/06 02:06pm
By: Dirk
Since you have public_html in your URL, it must also be part of the URL for the 404.php:
ErrorDocument 404 /public_html/404.php
bye, Dirk
Editing 404.php?
Posted on: 03/08/06 02:13pm
By: koalasoft
excellent dirk, thank you very much I work