high_420
asked on
I can't index my password protected pages with my search engine HELP!!
I need help indexing my password protected pages with my search engine which is the isearch engine.
If you want to index them, why do you password protect them then?
ASKER
for members only I want my own search egine to index them.
I don't think you can do it directly via isearch (unless you have the professional edition, which allows you to alter the sourcecode)
You will need to find ways around it. You could add a flag to your password protected pages to allow the search engine to go ahead without logging in (maybe check ip, user agent and so on...)
You will need to find ways around it. You could add a flag to your password protected pages to allow the search engine to go ahead without logging in (maybe check ip, user agent and so on...)
ASKER
Any ideas on how to acomplish this. I do have the pro version but
I'm using php 5 on my web pages.
I'm using php 5 on my web pages.
Can you show me the code that handles the login on your pages?
ASKER
Here is my code
<?php
# User is redirected here from login.php.
session_name ('ID');
session_start(); // Start the session.
// If no session value is present, redirect the user.
if (!isset($_SESSION['agent'] ) OR ($_SESSION['agent'] != md5($_SERVER['HTTP_USER_AG ENT'])) ) {
// Start defining the URL.
$url = 'http://' . $_SERVER['HTTP_HOST'];
// Check for a trailing slash.
if ((substr($url, -1) == '/') OR (substr($url, -1) == '\\') ) {
$url = substr ($url, 0, -1); // Chop off the slash.
}
$url .= '/login.php'; // Add the page.
header("Location: $url");
exit(); // Quit the script.
}
?>
<?php
# User is redirected here from login.php.
session_name ('ID');
session_start(); // Start the session.
// If no session value is present, redirect the user.
if (!isset($_SESSION['agent']
// Start defining the URL.
$url = 'http://' . $_SERVER['HTTP_HOST'];
// Check for a trailing slash.
if ((substr($url, -1) == '/') OR (substr($url, -1) == '\\') ) {
$url = substr ($url, 0, -1); // Chop off the slash.
}
$url .= '/login.php'; // Add the page.
header("Location: $url");
exit(); // Quit the script.
}
?>
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.