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:

{middle} and variables (2002) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) Spiders and Bots (2000) Cart ID (1999) Itools, WEBCAT OSX (2003) how is this possible (2000) Passing [quantity] (2000) Associative lookup style? + bit more (1997) Trouble with formula.db (1997) member logins database (2003) WebCatalog 2.0.1 NT beta 1 released (1997) database freeze (1997) RE: Explorer oddities (1997) change the number format (1997) Formating found categories (1997) Caching pages...again (2001) SQL Ref. (1999) Nested tags count question (1997) Setting up shop (1997) Protecting databases (1999)