Jump to content

Problem redirecting to $_SERVER['REQUEST_URI'] after login


mejpark

Recommended Posts

Hello,

 

I am trying to redirect non-authenticated users to following url after login:

 

http://xxxxxxxxxx.xxxx.xx.xx/dvd_process_script.php?response=accept&owner=3&dvdid=55&requester=9

 

But the URL above doesn't seem to be stored in $_SERVER['REQUEST_URI'] upon requesting it.

 

The general logic of my script is:

 

<?php

if(user is logged in) {
    
    // redirect to home page

} else {

    // this block executes because ALL users logged out

    echo $_SERVER['REQUEST_URI'];

    exit(); // for test purposes

}

?>

 

 

Confusingly, the above code outputs '/index.php' which was not what I was expecting. How would I go about redirecting to the desired url above (including get parameters)?

 

Thanks,

 

Mike

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.