开发者

Redirect a page from a remote server to another server in PHP

We have a wiki site which when accessed, checks for cookies to see whether the user is authenticated. If not, the page is redirected to an authentication page which is outside the domain. Once the user is authenticated, the authentication page POSTS the data along with the cookies to wiki page(index.php).

Now, i am introducing a new wiki server and we want to render the wiki contents from this server instead of the original wiki server. I do not have any control on the authentication server. So cannot make any change there. Also, I cannot change the DNS entries to the new server yet as it is still being tested. Only option I have is to redirect from the original wiki page to the new wiki page.

My question is how do i redirect along with cookies and posted content from original index.php to the new site's index.php. I was not able to retrieve the开发者_高级运维 cookies from the header. Your help would be greatly appreciated.


it's not possible for you to read a cookie set by another server how unsecure wouldnt that be, what you can do send the data through get alt post and then read it on the auth page of course that means you need to be able to change the auth page

but when i think of it you could maybe set a cookie for another domain how well it would work im not sure, eh try

setcookie('name','value','expires','/','NEW DOMAIN GOES HERE');

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜