Topic: Redirection to multiple pages and/or directories (Read 1749 times)
Kill the googlebot
Posts: 6
44 credits Members referred : 0
Turkish translator
« on: Jul 25, 2006, 03:25:08 am »
Hi Olaf,
Firstly, thank you for this great script. It really helped a lot to ease my job and my mind. Nevertheless, I have a problem that I cannot tackle, being a newbie in php.
The problem is this: I have a site with multiple subdirectories such as: mysite.com/apages/, mysite.com/bpages/, etc. I am trying to provide an option to login from anywhere in the site, but I would like to have the access_user class redirect the logged-in user to the originating page. English is not my native language, so let me put it in simpler terms:
User A clikcks the login link on page mysite.com/apage.php after logging in, he should be redirected to mysite.com/apage.php User B clicks the login link on page mysite.com/bpage.php. After logging in, he should be redirected to mysite.com/bpage.php.
But the db_config file allows only one page for redirection ("define("START_PAGE", "mypage")"). How can I accomplish this? I tried it by using http_referer, etc. but of no avail. Thank you in advance for your kind support.
I crack Photoshop!
Gender:
Posts: 3
18 credits Members referred : 0
« Reply #1 on: Jul 25, 2006, 08:17:46 am »
Hi all To what attribute you distinguish users?
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #2 on: Jul 25, 2006, 11:02:48 am »
Hello,
What you are trying to is possible but you need write some new code to get it working like this. The script is written to redirect after login if someone access a protected page before.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
don't understand what you're meaning... please explain a little bit more.
Kill the googlebot
Posts: 6
44 credits Members referred : 0
Turkish translator
« Reply #4 on: Jul 25, 2006, 11:10:20 am »
Thank you for your prompt reply Olaf,
In fact, pages are not protected. That is to say, they are accessible before login. However, there is a login link in the footer section. Then why I need this? Simply put, without login, the user is allowed to view the page. And login adds an "edit/modify/create" option for the page in question.
In fact, each subdirectory deals with a different topic, and it is possible to have multiple copies of access_user class installed for each subdirectory which is what I did originall. In this case, the script functions well. I simply wanted to avoid from such multiple installations.
« Last Edit: Jul 25, 2006, 11:13:46 am by layman »
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #5 on: Jul 25, 2006, 11:14:59 am »
Quote
Then why I need this? Simply put, without login, the user is allowed to view the page. And login adds an "edit/modify/create" option for the page in question.
Yes why not, you can show a member additional content, I use the class to show prices to members only...