Redirecting user to a login page

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Mar 2005
Posts: 1
Reputation: Cynthia is an unknown quantity at this point 
Solved Threads: 0
Cynthia Cynthia is offline Offline
Newbie Poster

Redirecting user to a login page

 
0
  #1
Jul 2nd, 2009
Hi,

I want to know if there is a way to prevent users from manually typing in the URL and entering the page after they have already signed out?

I was able to make the back button disabled.

Let's say if they have already click logout and when they click back, it won't go anywhere, which is what I want.

But, if they manually type in the url address, it will take them to that page. What I want to do is after they logout and whenever they try to type the url, it should not take them to that page, but instead to the login page.
is this possible? if yes, how?

Thank you for your help.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: Redirecting user to a login page

 
0
  #2
Jul 2nd, 2009
it has to do with caching. your page is cached on the clients computer, that is why they are able to get the page. if your server-side is asp.net then you can control caching settings for both client and server side. but i cant say anything about php and jsp for that matter.
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 13
Reputation: Bojero is an unknown quantity at this point 
Solved Threads: 3
Bojero Bojero is offline Offline
Newbie Poster

Re: Redirecting user to a login page

 
0
  #3
Jul 3rd, 2009
Cache control is done via headers in PHP as far as I know..

Found something in the PHP documentation:
  1. <?PHP
  2. header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
  3. header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
  4. header( 'Cache-Control: no-store, no-cache, must-revalidate' );
  5. header( 'Cache-Control: post-check=0, pre-check=0', false );
  6. header( 'Pragma: no-cache' );
  7.  
  8. ?>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC