can i go to a script-defined URL?

question: i have a script that defines a URL by inserting information (via variables) into a basic URL form:

http://...../mywebpage/$variable1.html#$variable2

currently all the script does is print the new url on a new page...is there a way to make the script run, make the new url and then -go- to the new URL (without the user doing anything other than initiating the script)?

:) thanks in advance
destyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

adam923Commented:
instead of print "Content-type: text\html/n/notherstuff";
just do print "Location: http://www.yahoo.com/\n\n";
and then exit the script.
0
jsatterlCommented:
You have two choices...

Either use the Location tag read by
the browser, as in

print "Location: $url\n\n";

Do not print out the header/content type with this method.

-OR-

Use the http redirect supported by most browsers these days, as in

print "Content-Type:  text/html\n\n";
print "<html><head>\n";
print "<meta http-equiv=\"refresh\" content=\"0; url=$redirect\">\n";
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
destyAuthor Commented:
yay! it works! thank you! :) :) :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.