Re: [BULK] Re: [WebDNA] How to code a 301 redirect

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 102570
interpreted = N
texte = --Apple-Mail-1--108522587 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Yes, if you look around in the archives, you will find this tag works only on certain platform/web servers. It's inor bug list, but it has not been addrssed as of yet. D Sent from my iPhone On May 14, 2009, at 4:42 PM, Clint Davis wrote: > Donovan, > > I can't get a 301 to work. If I change the header to a 302 Found, it > works perfect. Thoughts? > > WebDNA 6.0a || MacOS X 10.4.11 > > > > On Jul 21, 2008, at 1:04 PM, Donovan Brooke wrote: > >> Regarding the 301.. the newer Function context as well >> as the newer pre-parse script allow us to make just >> about any kind of WebDNA context that we want. Here is >> the 301 redirect using those features. >> >> >> (Put this in your page, or better yet, in your pre-parse include >> file) >> >> [!] ** 301 Redirect ** [/!] >> [function name=301redirect] >> >> [hideif ||[url][raw][redirect_url][/raw][/url]|^|[url][redirect_url] >> [/url]|] >> [text]CRLF=[unurl]%0D%0A[/unurl][/text] >> [text]result=HTTP/1.1 301 Moved Permanently >> Location: [redirect_url][/text] >> [/hideif] >> >> [return][returnraw][result][CRLF][CRLF][/returnraw][/return] >> [/function] >> >> >> Then, to implement a quick 301, call the function with: >> >> [301redirect redirect_url=] > > > --Apple-Mail-1--108522587 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Yes, if you look around in the = archives, you will find this tag works only on certain platform/web = servers. It's inor bug list, but it has not been addrssed as of = yet.

D

Sent from my = iPhone

On May 14, 2009, at 4:42 PM, Clint Davis <cdavis@grayloon.com> = wrote:

Donovan,

I can't get a 301 to = work. If I change the header to a 302 Found, it works perfect. = Thoughts?

WebDNA 6.0a  ||  MacOS X = 10.4.11



On Jul 21, = 2008, at 1:04 PM, Donovan Brooke wrote:

Regarding the 301.. the newer Function context as = well
as the newer pre-parse script allow us to make just
about any = kind of WebDNA context that we want. Here is
the 301 redirect using = those features.


(Put this in your page, or better yet, in = your pre-parse include file)

[!] ** 301 Redirect ** = [/!]
[function name=3D301redirect]

[hideif = ||[url][raw][redirect_url][/raw][/url]|^|[url][redirect_url][/url]|]
=  [text]CRLF=3D[unurl]%0D%0A[/unurl][/text]
[text]result=3DHTTP/1.1= 301 Moved Permanently
Location: = [redirect_url][/text]
[/hideif]

[return][returnraw][result][CRLF= ][CRLF][/returnraw][/return]
[/function]


Then, to = implement a quick 301, call the function with:

[301redirect = redirect_url=3D<http://yoururl>]

=

= --Apple-Mail-1--108522587-- Associated Messages, from the most recent to the oldest:

    
--Apple-Mail-1--108522587 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Yes, if you look around in the archives, you will find this tag works only on certain platform/web servers. It's inor bug list, but it has not been addrssed as of yet. D Sent from my iPhone On May 14, 2009, at 4:42 PM, Clint Davis wrote: > Donovan, > > I can't get a 301 to work. If I change the header to a 302 Found, it > works perfect. Thoughts? > > WebDNA 6.0a || MacOS X 10.4.11 > > > > On Jul 21, 2008, at 1:04 PM, Donovan Brooke wrote: > >> Regarding the 301.. the newer Function context as well >> as the newer pre-parse script allow us to make just >> about any kind of WebDNA context that we want. Here is >> the 301 redirect using those features. >> >> >> (Put this in your page, or better yet, in your pre-parse include >> file) >> >> [!] ** 301 Redirect ** [/!] >> [function name=301redirect] >> >> [hideif ||[url][raw][redirect_url][/raw][/url]|^|[url][redirect_url] >> [/url]|] >> [text]CRLF=[unurl]%0D%0A[/unurl][/text] >> [text]result=HTTP/1.1 301 Moved Permanently >> Location: [redirect_url][/text] >> [/hideif] >> >> [return][returnraw][result][CRLF][CRLF][/returnraw][/return] >> [/function] >> >> >> Then, to implement a quick 301, call the function with: >> >> [301redirect redirect_url=] > > > --Apple-Mail-1--108522587 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Yes, if you look around in the = archives, you will find this tag works only on certain platform/web = servers. It's inor bug list, but it has not been addrssed as of = yet.

D

Sent from my = iPhone

On May 14, 2009, at 4:42 PM, Clint Davis <cdavis@grayloon.com> = wrote:

Donovan,

I can't get a 301 to = work. If I change the header to a 302 Found, it works perfect. = Thoughts?

WebDNA 6.0a  ||  MacOS X = 10.4.11



On Jul 21, = 2008, at 1:04 PM, Donovan Brooke wrote:

Regarding the 301.. the newer Function context as = well
as the newer pre-parse script allow us to make just
about any = kind of WebDNA context that we want. Here is
the 301 redirect using = those features.


(Put this in your page, or better yet, in = your pre-parse include file)

[!] ** 301 Redirect ** = [/!]
[function name=3D301redirect]

[hideif = ||[url][raw][redirect_url][/raw][/url]|^|[url][redirect_url][/url]|]
=  [text]CRLF=3D[unurl]%0D%0A[/unurl][/text]
[text]result=3DHTTP/1.1= 301 Moved Permanently
Location: = [redirect_url][/text]
[/hideif]

[return][returnraw][result][CRLF= ][CRLF][/returnraw][/return]
[/function]


Then, to = implement a quick 301, call the function with:

[301redirect = redirect_url=3D<http://yoururl>]

=

= --Apple-Mail-1--108522587-- Donovan

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Lambada for Macintosh is Here! (1996) [include ...] behavior (1997) listfiles-looking for slick solution (1997) Error: Too many nested [xxx] contexts (1997) There's a bug in the math context ... (1997) [WebDNA] writing pdfs on the fly (Avery labels #5160) (2010) Ooops..Broswer Info.txt (was Web*SSL and WebCatalog) (1997) catching WebDNA error messages (2003) Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (2002) Problems with date math (1997) Problems with Price field (1997) [WebDNA] WebDNA Roll Call (2013) Re[2]: Enhancement Request for WebCatalog-NT (1996) $purchase WITHOUT creditcar (1997) Using Grep to Format Text (2001) ANother SHOWIF problem (1997) no [search] with NT (1997) Emailer port change (1997) creates folders with AS (1997) Keep away (1997)