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:

Nav. 4 probs with cart (1997) Does TCPconnect/TCPsend do multiples? (2000) [Announce]: Web server security and password protection (1997) Server slowing down. (1997) WebCat sometimes doesn't respond (2000) Laying an egg. (1998) [OT] Who's got a cool link (2002) Delayed Redirect (2000) A little syntax help (1997) Line items in table cells (1997) Highlighting words found in a keyword search (2003) Showif probably dumb question (1997) [isfolder] and [filename] (1997) Country & Ship-to address & other fields ? (1997) How far do [showif]s go? (1997) expired beta (1997) Template transformed itself into a database? (1998) Cyberstudio and WebDNA (1997) emailer (1997) combining strings (1997)