PDA

View Full Version : Redirecting NON-Logged in people to external page?


idwf
03-25-2006, 11:55 AM
Hello there guys and girls.

I'm allready aware of the following code,

Quote:

<?php
chdir('../forums');
require_once('../forums/global.php');
if ($vbulletin->userinfo['userid'] == 0)
{
print_no_permission();
}
?>


however, due to folder restrictions and links to databases, this isn't going to function on my website. The function of the code is perfect and it redirect's people who arn't logged in onto a login page. However, I would like them to be linked to another page.

My website is set up in the following way. I have a main directory, in which there are folders 'forums', 'html', 'images' and 'scripts'. The index.php is in 'html' and (obviously) all the forums are in 'forums'. Is there a way of getting peope who arn't logged in on 'index.php' to redirect them to 'notloggedin.php' (which is also in the 'html' folder) ?

I know it may seem confusing...thanks for trying! https://vborg.vbsupport.ru/