Difference between revisions of "Ns returnredirect"

From AOLserver Wiki
Jump to navigation Jump to search
(imported from WiKit id 644)
 
Line 31: Line 31:
 
----
 
----
  
[[Category Documentation]] - [[Category Core Tcl API]]
+
[[Category:Documentation]] - [[Category:Core Tcl API]]

Revision as of 19:28, 7 February 2009

Man page: http://aolserver.com/docs/tcl/ns_returnredirect.html


NAME

ns_returnredirect - Redirect the client to another location

SYNOPSIS

ns_returnredirect ?connid? url

DESCRIPTION

This command redirects the client by returning a 302 (Redirection) HTTP status code, and a Location header pointing at url.
The optional connid parameter is deprecated and should not be used. If url is not specified, a 204 (No Content) HTTP status code is returned.
NOTE: The script does not end at the time this command is invoked. ns_adp_abort or ns_adp_return should be called to end script processing after ns_returnredirect.
2005may23 Dossy: After many inquiries about being able to return a 301 instead of 302, I suggest introducing a new ns_returnmoved which implements the 301.

EXAMPLES

   ns_returnredirect http://www.aolserver.com/

SEE ALSO

ns_return, ns_returnadminnotice, ns_returnbadrequest, ns_returnerror, ns_returnfile, ns_returnforbidden, ns_returnfp, ns_returnnotfound, ns_returnnotice, ns_returnok, ns_returnunauthorized

-