I'm working on a site for which the customer wants all pages secured. I'm
using PHP's sessions, testing that the member_id is registered. If not, the
user is sent to the logon page. This is not a username:password scenario.
Three items, the subscriber's first and last names, and the password, are
all solicited on the logon page and if everything is OK, the session is
started with the user's member_id registered.
This little bit of PHP code at the top of every page, before the <html>
tag, tests for the registered member_id and sends the user to the logon
page if it's not present:
<? session_start();
if( !session_is_registered( "member_id" ) )
{
header("Location: user_logon.php\n");
}
?>
Other than this little bit of code, the pages are straight HTML.
When rundig is executed from the command line, htdig apparently hits this,
decides it's a redirect, and doesn't index the page.
I have tried executing rundig from within a PHP script, so that I could set
start a session and register a dummy member_id. This script calls rundig
using PHP's system() function. All of rundig's output is echoed to the
browser, and is exactly the same as when it is run from the command line.
And of course indexing does not go beyond the first page of the site,
because of redirects.
I then examined PHP's sever_vars, to see if there was something there I
could use. Aha - the referring-uri is always "/admin/admin_htdig.php". If a
test for that is true, the session test will be skipped. No dice - htdig
is still giving me redirects.
Something I just thought of - would this not happen if the Location:
reference was to "./user_logon.php", as that would appear to keep it within
the site?
I feel that I'm beginning to run out of options. Advice or suggestions from
anyone who has done this would be most helpful.
Yours truly - Miles Thompson
_______________________________________________
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