Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^2: Good way to redirect to a "members only" section of website

by yagna (Novice)
on Feb 02, 2013 at 17:17 UTC ( #1016727=note: print w/replies, xml ) Need Help??

in reply to Re: Good way to redirect to a "members only" section of website
in thread Good way to redirect to a "members only" section of website

Hi WW, The default page is as you mentioned index.cgi. Sounds like the general approach is to redirect to a index.html/index.cgi on successful login. Just a clarification: the two page includes the login page (so I have the login page and an index.cgi) Thanks for confirming! Yagna
  • Comment on Re^2: Good way to redirect to a "members only" section of website

Replies are listed 'Best First'.
Re^3: Good way to redirect to a "members only" section of website
by ww (Bishop) on Feb 02, 2013 at 18:03 UTC

    " the two page includes the login page...."
    Actually, if I read your explanation as you intended, that's exactly what I'm urging you to avoid.

    My preferred schema is:
    1. Create a default, static "index.html (.asp. .net, whatever)" FOR EVERY VISITOR which includes a link to "login.cgi"
    2. Have login.cgi's (separate) action script (call it "login_test.cgi") check the uname and pw against whatever you're using for your "approved members" list
        ...if successful,
      call "application_page1.cgi"
        } else { "page2.html" which announces "login failed" or similar (as in my initial reply) and provides a link to the default ("index.html" or whatever).

    You can, without dangerously deviatating from my schema, have login_test.cgi's failure action send a user who entered the wrong credentials directly back to index.html without any explanation, but that's unkind to the maker of an innocent error.

    Please excuse my assumptions about your intent; I've been known to err (but with good intent) in that area.

      Hi ww, Thanks for the clarification. I am using a model similar to the ajax login form as dettailed here Since this uses ajax, the login error message is displayed in the same page. My question is about how you "call" another cgi script? That is my problem. How on successful authentication, I redirect(call) another cgi script/ html page ?

      ...if successful, call "application_page1.cgi" } else { "page2.html"

        Your link to the IBM page is illuminating... and a pretty good rundown for others who come later, looking for answers to some of the same things bothering you. ++

        However, see my next reply for what I was talking about: the reply indentation gets heavy and the rendered-reply-box gets too narrow at this level of response.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016727]
[perldigious]: Also coincidentally, I'm currently in the middle of a winter storm that has dropped 1 foot of snow and is expected to drop another. I might have to adapt this for customers/vendors who come visit and put it at the beggining of every presentation I give.
[Discipulus]: the photo was removed... Cyrano de Berjerac was not of the same idea..
[stevieb]: perldigious: video near our hq in Montreal. Here in Calgary, it's -28c... we've only got 3" of snow so far, but there are several feet in the mountains already
[perldigious]: Snowshoeing time stevieb? I need to buy a pair so I can walk my German Shepherd properly through the country.
[stevieb]: yeah, I snowshoe a fair amount in the mountains. I also use spikes similar to these very often as well
[perldigious]: Discipulus: alternate link
[stevieb]: LOL you can easily replace "Helsinki" with "Alberta"

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2016-12-06 16:30 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (112 votes). Check out past polls.