Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Help with .htaccess and 404.

 
   Web Hosting Problem Solving Community! (Home) -> Webmaster RSS
Next:  time of day access  
Author Message
siminfrance

External


Since: Jul 30, 2003
Posts: 15



(Msg. 1) Posted: Wed Jul 30, 2003 2:58 pm
Post subject: Help with .htaccess and 404.
Archived from groups: alt>www>webmaster (more info?)

Hi,

In my .htaccess I have

ErrorDocument 404 /Error404php.php

And it works fine, but how do I know what page the user was looking for and
was not found? lately my logs show 100's of 404, (a lot more than usual), so
I suspect it is my fault but without knowing where they are trying to link
to I am a bit stuck.

So, is it possible to get the name of the page the user was looking for?

Kin Regards.

Sims

 >> Stay informed about: Help with .htaccess and 404. 
Back to top
Login to vote
capt80

External


Since: Jul 24, 2003
Posts: 116



(Msg. 2) Posted: Wed Jul 30, 2003 2:58 pm
Post subject: Re: Help with .htaccess and 404. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <bg84s7$m008t$1@ID-162430.news.uni-berlin.de>,
siminfrance DeleteThis @hotmail.com says...
 > Hi,
 >
 > In my .htaccess I have
 >
 > ErrorDocument 404 /Error404php.php
 >
 > And it works fine, but how do I know what page the user was looking for and
 > was not found? lately my logs show 100's of 404, (a lot more than usual), so
 > I suspect it is my fault but without knowing where they are trying to link
 > to I am a bit stuck.
 >
 > So, is it possible to get the name of the page the user was looking for?
 >
 > Kin Regards.
 >
 > Sims
 >
 >
 >
and the url of your site is ?<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Help with .htaccess and 404. 
Back to top
Login to vote
dorward

External


Since: Jun 27, 2003
Posts: 197



(Msg. 3) Posted: Wed Jul 30, 2003 3:05 pm
Post subject: Re: Help with .htaccess and 404. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sims wrote:

 > In my .htaccess I have
 > ErrorDocument 404 /Error404php.php

I have something very similar.
ErrorDocument 404 /errors/404.html

 > And it works fine, but how do I know what page the user was looking for
 > and was not found?

Looking at the error log does the trick for me (some slight obscurification
for privicy)...

$ tail -n1 /hosts/david.us-lot.org/logs/error.log
[Wed Jul 30 12:04:56 2003] [error] [client XXX.XXX.XXX.XXX] File does not
exist: /XXXXXXX/XXXXXXXX/www/does/not/exist


--
David Dorward <a style='text-decoration: underline;' href="http://david.us-lot.org/" target="_blank">http://david.us-lot.org/</a>
Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming
it'll stop pop-up ads? -- Dork Tower<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Help with .htaccess and 404. 
Back to top
Login to vote
siminfrance

External


Since: Jul 30, 2003
Posts: 15



(Msg. 4) Posted: Wed Jul 30, 2003 4:14 pm
Post subject: Re: Help with .htaccess and 404. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

  > > Hi,

  > >
 > and the url of your site is ?
.... not going to make any difference, is it?

Anyways, using "getenv ("REQUEST_URI");" in the Error PHP file allows me to
receive an email when there is an error.
And hopefully correct them without getting too many mails Smile

Regards.

Sims<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Help with .htaccess and 404. 
Back to top
Login to vote
sp_bhuisman

External


Since: Jun 27, 2003
Posts: 571



(Msg. 5) Posted: Wed Jul 30, 2003 4:14 pm
Post subject: Re: Help with .htaccess and 404. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 30 Jul 2003 13:14:38 +0200, Sims <siminfrance.RemoveThis@hotmail.com> wrote:

 >
   >> > Hi,
 >
   >> >
  >> and the url of your site is ?
 > ... not going to make any difference, is it?
 >
 > Anyways, using "getenv ("REQUEST_URI");" in the Error PHP file allows me
 > to
 > receive an email when there is an error.
 > And hopefully correct them without getting too many mails Smile
 >
 > Regards.
 >
 > Sims

I don't understand. Getting the REQUEST_URI is the way to do it, so why
did you ask how in your OP? I'm assuming either you found the answer
yourself or your question referred to something else. So?

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com" target="_blank">http://www.greywyvern.com</a> - Orca RingMaker: PHP web ring creation and
management<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Help with .htaccess and 404. 
Back to top
Login to vote
siminfrance

External


Since: Jul 30, 2003
Posts: 15



(Msg. 6) Posted: Wed Jul 30, 2003 6:56 pm
Post subject: Re: Help with .htaccess and 404. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 >
 > I don't understand. Getting the REQUEST_URI is the way to do it, so why
 > did you ask how in your OP? I'm assuming either you found the answer
 > yourself or your question referred to something else. So?
 >

Hi,

Yes I did find the answer somewhere else.
I just wanted to share it with the others.
Maybe I should have spent a little bit longer trawling google but at the
time I thought I did everything.

Regards

Sims.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Help with .htaccess and 404. 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]