Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

python cgi redirect?

Posted on 2010-11-12
3
Medium Priority
?
497 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 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show the steps for installing Python on Ubuntu Operating System. I have created a virtual machine with Ubuntu Operating system 8.10 and this installing process also works with upgraded version of Ubuntu OS. For installing Py…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
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…
Suggested Courses

824 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