4D v13.4WEB SEND HTTP REDIRECT |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
WEB SEND HTTP REDIRECT
WEB SEND HTTP REDIRECT
The WEB SEND HTTP REDIRECT command allows you to transform a URL into another one. The url parameter contains the new URL that allows you to redirect the request. If this parameter is a url to a file, it must contain the reference to this file, for example: WEB SEND HTTP REDIRECT ("/MyPage.HTM"). This command prevails over commands that send data (WEB SEND FILE, WEB SEND BLOB, etc.) that may be in the same method. This command also allows you to redirect a request to another Web server. 4D automatically encodes the URL’s special characters. If you pass the * character, 4D will not translate them. Note that the status of the request sent by this command is 302: Moved Temporarily. If you need a "moved permanently" status (status 301), you can set a HTTP X-STATUS: 301 field in the header of the reply. You can use this command to execute custom requests in 4D by using static pages. Imagine that you have placed the following elements in a static HTML page: Note: The POST action “/4dcgi/rech” has been associated to the text area and to the OK and Cancel buttons. In the On Web Connection Database Method, you insert the following code: Case of
|
PROPERTIES
Product: 4D
INDEX HISTORY
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||