Web Connection
wwHTTPHeader - Redirection
Gravatar is a globally recognized avatar based on your email address. wwHTTPHeader - Redirection
  Marcel DESMET
  All
  Oct 11, 2021 @ 03:01am

Hello,

Just want to make a 301 redirection for a dynamic content to a static Html content.

Original url www.mysite.com/recipies.xx?id=0126 Redirection www.mysite.com/apple-pie.html

It seems that the help files for the class wwHTTPHeader class are not avaible ?

Tks for you help

Marcel

Gravatar is a globally recognized avatar based on your email address. re: wwHTTPHeader - Redirection
  Rick Strahl
  Marcel DESMET
  Oct 11, 2021 @ 02:12pm

There is no more wwHttpHeader class in recent versions. You just use Response.AppendHeader() or you can set Response.Status to set the status code and message as a string:

Response.Status = "301 Moved"
Response.AppendHeader("Location", lcUrl)

But it's actually easier with Response.Redirect(). For a 301 permanent redirect use:

* Permanent Redirect
Response.Redirect(lcUrl, .T.)

+++ Rick --

© 1996-2021