I see how my question seems a little vague so I'll give a more concrete example. I have an admin script for the website that is its own application.
Package Site::Admin; use base 'CGI::Application'; ... ---.htaccess----- Action admin /cgi-bin/siteadmin.pl AddHandler admin .html -----------------------
So now, any html file requested in this directory will be have its request redirected to my admin app. The static pages here are simple pages like a list of admin options that don't require any code to generate. I don't want just any Joe Lookyloo getting access to these pages, so I want to make sure that the user is authenticated before accessing the page.
If I do a simple redirect after verifying authentication, I end up back at the login page instead of the static page because all requests for html files have to pass through my app. It looks like the only solution is to open the file for the static page and effectively serve the page from my app.
I am wondering if there is a better way of solving the problem of serving static pages using this method. I know that if I had some additional Apache modules and mod_perl, this would not be an issue, but the shared hosting limits my options.
In reply to Re: CGI::Application::Authentication and Static Pages
by digger
in thread CGI::Application::Authentication and Static Pages
by digger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |