Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl Calling up Web Pages

Status
Not open for further replies.

jollyroger

Technical User
Mar 22, 2001
77
GB
Hello there
I hope somebody can help me. I have created a cgi script which authenticates my users against values in a database.
But once logged in I would like them to be taken to the next page. I really don't want to use the perl http module as we have already written the pages, instead I would simply like the perl script to call up the *.html page.
How can I do this?
Jollyroger
 
All you really need to do is place the following line at the end of the Perl script.

Code:
print "Location: [URL unfurl="true"]http://www.domain.com/path/to/page.html\n\n";[/URL]
 
Thanks very much, but will this make the page open automatically if a certain condition is met?
i.e. is this a link that is displayed on the screen or does the page actually open?
Anyway I will try it tonight when I am at home.
Thanks again.
With regards
Jollyroger
 
That will cause the browser to automatically load that page. It's called a "redirect". Don't print anything BUT that one line, or it may not work. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Hello there

You were right the second time, it simply printed the line, which I thought it would do, how do you do a re-direct then?

With regards

Ben
 
You need to make sure that the location line is the ONLY line you print. Do NOT print a content-type header or anything else. That should make it work. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top