You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Timothy J. Luoma" <lu...@peak.org> on 2002/02/24 04:25:39 UTC

404 document does not show entered URL

Problem: When you ask for a missing URL at my site, you get the URL to my
"error_docs" page instead of the URL that you asked for.

To reproduce: try going to http://www.tntluoma.com/thisdoesnotexist/ and
you will end up at http://www.tntluoma.com/error_docs/not_found.html

I would like for the URL to be shown as
http://www.tntluoma.com/thisdoesnotexist/ so people can go to the address
and manually correct it if there is a small typo.

I tried Googling for the answer, but could not come up with any search
words that were giving me anything useful, even limiting the search to
www.apache.org or using the search feature at apache.org

Thanks for your time.  If anyone knows the cause/solution, please let me
know (obviously, I guess ;-)

TjL

-- 
mailto:  luomat@peak.org
Site:    www.tntluoma.com
Info:    Apache/1.3.19 (Unix) with PHP/4.0.6


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: 404 document does not show entered URL

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
"Timothy J. Luoma" wrote:
> 
> Ah... that's good to know.  Unfortunately I do not (to my
> knowledge) have access to the headers, as I am just a lowly
> user on this system.

If the ErrorDocument document is a script, just add that to the
header emission portion.  For instance, if it were a Perl script,
it might look like this:

#! /usr/bin/perl
#
print "Content-type: text/html; charset=ISO-8859-1\r\n";
print "\r\n";
print <<EOT
blah blah blah
EOT
exit(0);

Just change the top to look like this instead:

print "Content-type: text/html; charset=ISO-8859-1\r\n";
print "Status: 404 Not Found\r\n";
print "\r\n";
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: 404 document does not show entered URL

Posted by "Timothy J. Luoma" <lu...@peak.org>.
On Mon, 25 Feb 2002, Rodent of Unusual Size wrote:
                     ^^^^^^^^^^^^^^^^^^^^^^
(from my wife's favorite movie ;-)


> You can also fix this by having your errordocument script include a
> 'Status: 404 Not Found' line in its header fields. Otherwise what is
> likely happening is that the client is getting a 200 response because
> the errordocument was successfully retrieved.

Ah... that's good to know.  Unfortunately I do not (to my knowledge) have
access to the headers, as I am just a lowly user on this system.

Making it a /path/to/404doc.html worked for me.

Thanks
TjL


-- 
Site: www.tntluoma.com                       mailto:luomat@peak.org
Info: Apache/1.3.19 (Unix) with PHP/4.0.6
How does your webhost provider measure up to UCVHost?
See http://www.peak.org/~luomat/misc/tntluoma-uptime/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: 404 document does not show entered URL

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
You can also fix this by having your errordocument script
include a 'Status: 404 Not Found' line in its header fields.
Otherwise what is likely happening is that the client is
getting a 200 response because the errordocument was successfully
retrieved.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: 404 document does not show entered URL

Posted by "Timothy J. Luoma" <lu...@peak.org>.
On Sat, 23 Feb 2002, Joshua Slive wrote:

> > Problem: When you ask for a missing URL at my site, you get the URL to my
> > "error_docs" page instead of the URL that you asked for.
>
> Use a local url-path for your error-docs, rather than a full url starting
> with http.

Ah!  The site admin must have changed the site config. again without
telling anyone :-)

Nothing a local .htaccess couldn't fix

Thanks for the tip, I know have a much nicer 404 :-)

TjL

-- 
mailto:  luomat@peak.org
Site:    www.tntluoma.com
Info:    Apache/1.3.19 (Unix) with PHP/4.0.6


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: 404 document does not show entered URL

Posted by Joshua Slive <jo...@slive.ca>.
On Sat, 23 Feb 2002, Timothy J. Luoma wrote:

>
> Problem: When you ask for a missing URL at my site, you get the URL to my
> "error_docs" page instead of the URL that you asked for.
>

Use a local url-path for your error-docs, rather than a full url starting
with http.

ie., use
ErrorDocument 404 /error/404.html

See the ErrorDocument documentation for more details.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Newbie w/SSI problems

Posted by Belgarius <we...@dfxwebs.com>.
Greetings...

   I recently installed 1.3.23 here, under a Win98SE OS, which I understand
is less than desirable, and have encountered problems getting SSI's to work
with user's pages.  I've tried every possible combination of things in the
httpd.conf file, except the one that works, obviously.
   Here's the problem, with a bit of history.  I added Includes to the
Options, and uncommented the AddType text/html .shtml, along with the
AddHandler server-parsed .shtml in the main section, and set the server
running on port 8080 to test things.  All appeared normal on my pages,
including the one lonely SSI I use to include a news text.  I also have some
20 odd users that I host, each with a personal cgi folder, and subdomain
name, so I opted for using the VirtualHost containers to inform the server
where their particular items are kept.  The first tests with these pages
worked great, except for those with SSI as a part of them.  These returned
text errors, or in the case of one calling a text file from the user's cgi,
resulted in a blank "loading page" output that failed to time out, and,
along with this, presented me with an instance of Notepad opening up in the
task manager.  Since this is a rather busy site, and I was ill advised
enough to put Apache online after my initial tests, instead of insuring it
actually worked, I found multiple instances of Notepad open on more than one
occasion.  I've since removed the Includes from the Options, and
re-commented the AddType and AddHandler statements, and added these to the
VirtualHost container.  It no longer opens Notepad, however, the SSI
contents are not being added to the output sent to the browser.  Can someone
point me in a direction that might solve this problem?  I am certain that it
is something wrong in my httpd.conf file, but have been unable to resolve it
to date.  Here's an example of what I am using in the VirtualHost
containers:

<VirtualHost *>
    ServerAdmin member@mailserver.com
    DocumentRoot E:/users/memberfolder/htdocs
    ScriptAlias /cgi-bin/ "E:/users/memberfolder/cgi-bin/"
    ServerName sitename.server.com
    ErrorLog E:/users/memberfolder/error.log
    CustomLog E:/users/memberfolder/access.log combined
    Options +IncludesNOEXEC
    AddType text/html .shtml
    AddHandler server-parsed .shtml
</VirtualHost>

   Is there some other directive that I am missing, or some obvious mistake
made?  The only thing keeping me from using Apache is this SSI thing, other
than that, it seems to work perfectly, and eliminates a lot of problems that
I've experienced with those "nuke" CMS packages running under my present
server.

webmaster@dfxwebs.com
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/02


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org