Reply to Re: 'HTTP_REFERER'

Your name:

Reply:


Posted by juglesh on 10/13/05 03:35

windandwaves wrote:
> juglesh wrote:
> > windandwaves wrote:
> >> juglesh wrote:
> >>> Bert Melis wrote:
> >>>> 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'].
> >>>
> >>> Ahh, that's it. I had been using a common 404 for a few different
> >>> sites, therefore using an absolute path to it.
> >>>
> >>> Thanks alot!
> >>
> >> Madness, because i read about this, but even though I am using a
> >> relative path, I am still not getting the right page. Can anyone
> >> help or troubleshoot me through this one?
> >
> > Like you are not getting your 404 page? here is my .htaccess:
> >
> > // other mod rewrite stuff here
> > ErrorDocument 404 /404.php
> >
> > my 404.php is in the site root.
> >
> > here is my 404.php:
> >
> > <html><head>
> > <title>404</title>
> >
> > <script type="text/javascript" language="JavaScript">
> > <!--
> > // this is just the stuff that runs the text box thinger:
> >
> > function GoToURL(j) {
> > window.status=('Connecting....')
> >
> > var URLis;
> > URLis = document.URLframe.Dest.value
> >
> > j.value = "Connecting to: http:\\" + URLis
> > var location=("http://" + URLis);
> > this.location.href = location;
> > window.status=('Connecting to ' + URLis + ' Please wait........');
> >
> > }
> >
> > // this makes the enter key work as the go button:
> >
> > function submitenter(myfield,e)
> > {
> > var keycode;
> > if (window.event) keycode = window.event.keyCode;
> > else if (e) keycode = e.which;
> > else return true;
> >
> > if (keycode == 13)
> > {
> > GoToURL(myfield);
> > return false;
> > }
> > else
> > return true;
> > }
> >
> > //-->
> > </script>
> >
> > </head>
> >
> > <body>Sorry, there seems to have been an error.<br>
> >
> > <form name="URLframe">
> >
> > <input type="TEXT" name="Dest" size="100" value="<?php echo
> > $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>" onKeyPress="return
> > submitenter(this,event)">
> >
> > <input type="Button" name="Go to" value=" Go to... "
> > onClick="GoToURL(this)">
> > </form>
> >
> > </body>
> > </html>
>
>
> awesome it works now.

cool

> I just read through your script. Why are you getting people to submit the
> same url that they came from? or did I misunderstand your script?

I'm showing them what they typed in, so they can make a change and then
go.

[Back to original 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

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