SearchSearch   ProfileProfile   Log inLog in   RegisterRegister 

Redirect

 
Post new topic   Reply to topic    FirstSpot Forum Index -> Pre-sales Support Forum
View previous topic :: View next topic  
Author Message
chrkov



Joined: 04 Jan 2008
Posts: 8

PostPosted: Mon Jan 07, 2008 4:35 pm    
Post subject: Redirect

Should changing the line in the login_form.php from

<input type="hidden" name="ok_url" value="http://redirect.php">

to

<input type="hidden" name="ok_url" value="http://www.msn.com">

force a successful login to that network segment cause the redirect after login to go to msn instead of the original page?

I need the ability of some network segments to go to a specific page after successful login. So it needs to be able to be dynamic for different segments.

Right now it is not working, but it also states in the fs_login.php that the trial versions it will ignore. Once I register the software, will this work as I am expecting it to?

Thanks
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4435

PostPosted: Tue Jan 08, 2008 4:29 am    
Post subject:

Starting from v5, you can change the redirect page (after login) within Configuration Manager. Just go to UI Customization -> Redirect option and set it there.

You might want to revert your customization first...
_________________
~ Patronsoft Limited ~
Back to top
dominic
Forum facilitator


Joined: 23 Oct 2007
Posts: 103

PostPosted: Wed Jan 09, 2008 8:27 am    
Post subject:

You may not be able to set the redirect URL for different segments through the Configuration Manager. Instead, please perform the following modifications as a workaround in FirstSpot\authserv\redirectscript.php.

1) Replace line 27 (i.e. location="<?=$sess_desturl ?>";) with the following code segments.
<?php
if ($IP_segment == "192.168.1") {
?>
location="http://www.microsoft.com";
<?php
} elseif ($IP_segment == "192.168.2") {
?>
location="http://www.msn.com";
<?php
} else {
?>
location="<?=$sess_desturl ?>";
<?php
}
?>

2) Add the following code segments after line 12 (i.e. $value=$settingobj->getKey( "show_infobox", "gateway");).
require_once "common_functions.php";
$IP_segment = "";
$sess_patronsoft2=$_SESSION['sess_patronsoft2'];
if (isset($sess_patronsoft2)) {
$IP_str = long2ip($sess_patronsoft2);
$tok = explode(".", $IP_str);
$IP_segment = $tok[3].".".$tok[2].".".$tok[1];
}

The above codes act as an example for class C addresses, which redirects all 192.168.1.X to www.microsoft.com, all 192.168.2.X to www.msn.com and other IPs to their target URLs. You may need to further modify them to suit your situations.

Once again, you need to revert your changes first.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    FirstSpot Forum Index -> Pre-sales Support Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group