Re: 'HTTP_REFERER'
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: 'HTTP_REFERER'

From: Kai Birger Nielsen <bnielsen@daimi.au.dk>
Date: Fri Oct 14 2005 - 14:50:26 CEST

In <%Jq3f.213$S24.15622@news.xtra.co.nz> "windandwaves" <winandwaves@coldmail.com> writes:

>Kai Birger Nielsen wrote:
>> In <1129163717.987264.113260@g43g2000cwa.googlegroups.com> "juglesh"
>> <jugleshjunk@hotmail.com> writes:
>>
>>
>>> 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.
>>
>> A minor addition:
>> You need to use an absolute path for images in
>> your 404 document because relative paths are interpreted relative
>> to the bad url rather than to the path of the 404 document.

>A noticed what you describe above. That is catch22 because relative means
>that you can use $_SERVER['REQUEST_URI'] while absolute means that "nested"
>path work (e.g. www.246.dk/blah/blah/blah/blah/). Solution: use <base
>href="http://www.246.dk"> in your html.

Which I can see is exactly what I do, so we agree:
<base href="http://www.246.dk/" />

The last word of advice from here is to make sure you have
an error document for 403 too to catch bad urls like
http://www.246.dk/.htaps or in disguise http://www.246.dk/%2ehtaps

Kind regards
-- Birger Nielsen (bnielsen@daimi.au.dk)
Received on Tue Oct 18 02:41:25 2005