|
Posted by Ben Morrow on March 26, 2008, 10:16 am
Please log in for more thread options
>
> > Thanks for the help.
> >
> > but unfortunately it is not working.
> > The page is forwarding to another URL after URL re-writing.
> > which in turn does not solve my issue.
> >
> > I don't want user to bookmark my page and go directly to html page
> > instead of first executing login.pl script.
Why are you issuing a redirect at all? Just read in the HTML file
yourself, and serve it up as the output of your script with a text/html
Content-type.
> Then you *do* want to redirect at the client side, or maybe I'm not
> getting what your problem actually is...
If the user visits http://example.com/cgi.cgi, and that issues a 30x to
http://example.com/html.html, the address in the address bar will
change. If the user then bookmarks the page, the bookmark will be to
/html.html, bypassing the CGI. The only safe way around this is to
remove html.html from the document tree and have cgi.cgi return the HTML
directly: there is nothing to prevent a malicious user from visiting
/html.html directly if it is accessible. Depending on what you are
trying to do, HTTP auth may be a better solution.
Ben
|