You are here: Re: 'HTTP_REFERER' « PHP Programming Language « IT news, forums, messages
Re: 'HTTP_REFERER'

Posted by Philip Ronan on 10/12/05 17:23

"juglesh" wrote:

> So, how can we make a 404 page that either shows the poblem URL in the
> address bar, or can get the problem URL so I can display it in a text
> box where the user can correct it and click a 'go' button? (I know how
> to make that text box, but not how to get the problem URL).

You need to add an ErrorDocument directive to your .htaccess file:
<http://httpd.apache.org/docs/1.3/mod/core.html#errordocument>

e.g.
ErrorDocument 404 /error/my404.php

In your script at /error/my404.php, you can get the name of the originally
requested URI from $_SERVER['REQUEST_URI']

Once you've done that, any requests for non-existent files in the hierarchy
covered by your .htaccess file will be dealt with by your custom script.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

 

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

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