Solved

python cgi redirect?

Posted on 2010-11-12
3
474 Views
Last Modified: 2012-05-10
how do i send a redirect to the browser from a cgi script?
0
Comment
Question by:wrynn
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
mish33 earned 500 total points
ID: 34129579
print "Status: 302 Moved\nLocation: NEW_URL\n\n"
0
 

Author Comment

by:wrynn
ID: 34278787
i have to print that without it being after printing the content type as html right?
0
 
LVL 15

Expert Comment

by:mish33
ID: 34279742
yes, don't print anything else
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Dictionaries contain key:value pairs. Which means a collection of tuples with an attribute name and an assigned value to it. The semicolon present in between each key and values and attribute with values are delimited with a comma.  In python we can…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now