You are here: Re: Error 404 enigma « PHP Programming Language « IT news, forums, messages
Re: Error 404 enigma

Posted by Adam on 10/18/57 11:51

On Sun, 18 Jun 2006 13:11:49 +1200, Adam wrote:

>There must be a way to trap this in PHP, Shirley?

To answer my own post (sure sign of madness!):

http://httpd.apache.org/docs/2.1/mod/core.html#errordocument

If your ErrorDocument startswith http:// Apache sends a redirect (302)
to the error document, hence ***losing your original referer***. If
your ErrorDocument points to a relative path, 404 is maintained and so
are your variables.

I was using "http://" in my .htaccess - so $_SERVER['REQUEST_URI'] was
giving me the wrong value.

Using *relative* paths in .htaccess cured the problem - I now get a
full error URL passed to my error.php ... YAY!

Adam.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация