On Wednesday 23 October 2002 10:42, [EMAIL PROTECTED] wrote:
> Hi All,
>
> I read the last 2 hours a big part of the Mailing List according to:
> "Following 301 & 302 Requests" and couldn't really figure out if there
> exists a version of ht://Dig which supports e.g.:
>
> A PHP script which uses the Header -> Location in combination with relative
> URL's
>       <?php
>       header(Location:"somewhere.html")
>       ?>

AFAIK, 301/302 requests explicitly require an absolute URL.

If you use PHP for generating the redirect header information, you should 
build the absolute URL with the server variables $SERVER_NAME and 
$REQUEST_URI, e.g.
Header("Location:http://$SERVER_NAME".str_replace("old.html","new.html",$REQUEST_URI);

There is no problem processing *absolute* redirections in ht://Dig.

Most browsers, however, try to be "smart" and tolerate the violation of the 
header format, i.e. accept it and build the absolute URL themselves.
A few (like Lynx) can process it, but give notice that this is not standards 
compliant.


hth,

  Torsten

-- 
InWise - Wirtschaftlich-Wissenschaftlicher Internet Service GmbH
Waldhofstra�e 14                            Tel: +49-4101-403605
D-25474 Ellerbek                            Fax: +49-4101-403606
E-Mail: [EMAIL PROTECTED]            Internet: http://www.inwise.de



-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to