Difference between revisions of "Ns returnredirect"

From AOLserver Wiki
Jump to navigation Jump to search
(imported from WiKit id 644)
 
 
(One intermediate revision by one other user not shown)
Line 15: Line 15:
 
: This command redirects the client by returning a 302 (Redirection) HTTP status code, and a Location header pointing at ''url''.
 
: 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.
+
: The optional ''connid'' parameter is deprecated and should not be used.
  
: '''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'''.
+
: '''NOTE:''' The script does not end at the time this command is invoked.  When used in an adp page, [[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.''
+
: AOLserver 4.5 also includes an [[ns_returnmoved]] command (tcl procedure actually) which implements a redirect using the 301 code.
  
 
'''EXAMPLES'''
 
'''EXAMPLES'''
Line 27: Line 27:
 
'''SEE ALSO'''
 
'''SEE ALSO'''
  
: [[ns_return]], [[ns_returnadminnotice]], [[ns_returnbadrequest]], [[ns_returnerror]], [[ns_returnfile]], [[ns_returnforbidden]], [[ns_returnfp]], [[ns_returnnotfound]], [[ns_returnnotice]], [[ns_returnok]], [[ns_returnunauthorized]]
+
: [[ns_return]], [[ns_returnadminnotice]], [[ns_returnbadrequest]], [[ns_returnerror]], [[ns_returnfile]], [[ns_returnforbidden]], [[ns_returnfp]], [[ns_returnnotfound]], [[ns_returnnotice]], [[ns_returnok]], [[ns_returnunauthorized]], [[ns_returnmoved]], [[ns_internalredirect]]
  
 
----
 
----
  
[[Category Documentation]] - [[Category Core Tcl API]]
+
[[Category:Documentation]] - [[Category:Core Tcl API]]

Latest revision as of 22:59, 18 June 2010

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.
NOTE: The script does not end at the time this command is invoked. When used in an adp page, ns_adp_abort or ns_adp_return should be called to end script processing after ns_returnredirect.
AOLserver 4.5 also includes an ns_returnmoved command (tcl procedure actually) which implements a redirect using the 301 code.

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, ns_returnmoved, ns_internalredirect

-