Re: Manipulate Request Headers after Redirect
| From: | Louis Huppenbauer | Date: | Fri, 24 Jun 2011 07:37:54 +0000 |
| Subject: | Re: Manipulate Request Headers after Redirect | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313693@lists.php.net to get a copy of this message | ||
Thanks for your response, but I don't think that will do.
First - SERVER_PORT is the port the apache/iis/whatever server is
working with (usually 80 or 443)
Second - That would still be manipulating the headers for the response
(As php mostly just generates the response, and not the request).
I'm thinking more and more that this is not really a php-question (as
it is server-side), but more of a js-question (client-side).
thanks anyway!
louis
2011/6/24 <admin@buskirkgraphics.com>:
> Try
>
>
> If($_SERVER['SERVER_PORT'] == "302")
> {
> header('Referer: example.net');
> }
>
>
> Richard L. Buskirk
>
> -----Original Message-----
> From: Louis Huppenbauer [mailto:louis.huppenbauer@gmail.com]
> Sent: Friday, June 24, 2011 3:05 AM
> To: php-general@lists.php.net
> Subject: [PHP] Manipulate Request Headers after Redirect
>
> Hi there!
>
> I just have a small question concerning the http-protocol and php (and
> in specific the header-function, i think).
> Is it possible to manipulate the headers for the request which is sent
> after a 302-header?
>
>
> eg:
>
> Response:
> header('Referer: example.com');
> header('Location: example.net');
>
> Request (for the 302):
> header('Referer: example.net');
> header('Cache: max-age=0);
>
>
> I think I need that for a login to a tomcat app from an external
> php-form. As of now the Login works fine, I just have to reload the
> page to actually be logged in (and that is quite a bother).
>
>
> Sincerely yours
> Louis
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>