coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: bit bit spears on February 10, 2004, 04:47:40 AM

Title: redirect a logged user to the index page
Post by: bit bit spears on February 10, 2004, 04:47:40 AM
OK: I love casper's if user not logged it will send you to login php.

But lets say a user who is already logged in, when they come to a directory:

/gallery/index.php

if (USER_ID){

} else {
{
$redirect = $redirect . "login.php";
header("Location: $redirect");

exit();
}}


I know that script would refer you to login.php if you aren't logged in. But how would you make it to where if you would goto

/gallery/index.php

then it will redirect you to

images/index.php

If you are already logged in?

Thanks in advance!
Title: redirect a logged user to the index page
Post by: Joachim Müller on February 11, 2004, 12:28:34 AM
I don't understand the question. Maybe some of the english native speakers could answer this. If not, please try to write the question in more detail - I don't get it...

GauGau

P.S. what mod are you referring to?
Title: redirect a logged user to the index page
Post by: Casper on February 11, 2004, 12:34:13 AM
If I understand this correctly, you want to have the gallery/index.php direct you to another index.php, in a folder called images.  What is the point of that?
Title: bc
Post by: bit bit spears on February 11, 2004, 12:50:45 AM
because it is a gallery that is in another directory, but people will go to /whatever/ to get forwarded to the gallery.
Title: redirect a logged user to the index page
Post by: Joachim Müller on February 11, 2004, 01:28:46 AM
not coppermine related, but anyway: http://www.pageresource.com/html/metref.htm (or 1 million other pages when googling for "meta refresh" (http://www.google.com/search?q=meta+refresh))
Title: um yea
Post by: bit bit spears on February 11, 2004, 03:08:24 AM
um gau gau-it is, because you need to be logged into coppermine LOL.