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

Posted by Bert Melis on 10/12/05 18:28

If you put the absolute path into your htaccess

ErrorDocument 404 http://www.domain.tld/errors/404.php

the address in the address-bar of your browser changes to the
error-document. If you put a relative document in your htaccess

ErrorDocument 404 /errors/404.php

the address will not change, and you can fetch the wrong url by
$_SERVER['REQUEST_URI'].

Philip Ronan wrote:
> "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.
>

 

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

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