Re: How do I send a 404 HTTP header ?

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 56624
interpreted = N
texte = We're using the [RETURNRAW] context: [ReturnRaw]HTTP/1.1 404 Object Not Found Status: 404 Server: Your serverstring goes here Connection: Close MIME-Version: 1.0 Content-Type: text/html Your HTML goes here. [/ReturnRaw] >> A lot of this also relates to which platform/server is being run. >> What is it you're trying to achieve? > >WebDNA 5.1 >Apache >Linux > >To explain a bit more - I am trying to set up a Search Engine Safe system f= or >URLs using WebDNA and mod_rewrite. So far I have successfully grabbed the >requested URL (the bit 'stuff/morestuff' from 'http://domain/stuff/morestuf= f') >and have passed that on to a WebDNA template called 'parser.tmpl'. > >I then split out the string 'stuff/morestuff' using [listwords] and use the >individual parameters to search a content database. If a record is found a= n >include file is called in, if none is found then I want to redirect to a >custom error page 'error.tmpl'. > >This redirect with not cause a '404 page not found' error to be sent to the >browser however, so search engines in particular may think that incorrect U= RLs >are valid. > >So ... I was hoping that there might be a way using [setmimeheaders] or >something else to send a '404 page not found' message to the requesting >browser from the 'error.tmpl' page. In PHP this is achieved using somethin= g >like 'header("HTTP/1.1 404 Not Found");' - I'm just not sure how to do this >correctly using WebDNA. > >- Tom > > >------------------------------------------------------------- >This message is sent to you because you are subscribed to > the mailing list . >To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to > >Web Archive of this list is at: http://webdna.smithmicro.com/ -- ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Id=E9er AB SE-200 39 Malmoe Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: How do I send a 404 HTTP header ? ( Christer Olsson 2004)
  2. Re: How do I send a 404 HTTP header ? ( "Tom Duke" 2004)
  3. Re: How do I send a 404 HTTP header ? ( Christer Olsson 2004)
  4. Re: How do I send a 404 HTTP header ? ( "Tom Duke" 2004)
  5. Re: How do I send a 404 HTTP header ? ( Mark Derrick 2004)
  6. Re: How do I send a 404 HTTP header ? ( Donovan Brooke 2004)
  7. How do I send a 404 HTTP header ? ( "Tom Duke" 2004)
We're using the [returnraw] context: [returnraw]HTTP/1.1 404 Object Not Found Status: 404 Server: Your serverstring goes here Connection: Close MIME-Version: 1.0 Content-Type: text/html Your HTML goes here. [/ReturnRaw] >> A lot of this also relates to which platform/server is being run. >> What is it you're trying to achieve? > >WebDNA 5.1 >Apache >Linux > >To explain a bit more - I am trying to set up a Search Engine Safe system f= or >URLs using WebDNA and mod_rewrite. So far I have successfully grabbed the >requested URL (the bit 'stuff/morestuff' from 'http://domain/stuff/morestuf= f') >and have passed that on to a WebDNA template called 'parser.tmpl'. > >I then split out the string 'stuff/morestuff' using [listwords] and use the >individual parameters to search a content database. If a record is found a= n >include file is called in, if none is found then I want to redirect to a >custom error page 'error.tmpl'. > >This redirect with not cause a '404 page not found' error to be sent to the >browser however, so search engines in particular may think that incorrect U= RLs >are valid. > >So ... I was hoping that there might be a way using [setmimeheaders] or >something else to send a '404 page not found' message to the requesting >browser from the 'error.tmpl' page. In PHP this is achieved using somethin= g >like 'header("HTTP/1.1 404 Not Found");' - I'm just not sure how to do this >correctly using WebDNA. > >- Tom > > >------------------------------------------------------------- >This message is sent to you because you are subscribed to > the mailing list . >To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to > >Web Archive of this list is at: http://webdna.smithmicro.com/ -- ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Id=E9er AB SE-200 39 Malmoe Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Christer Olsson

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:

[WebDNA] paypal (2009) [Fileinfo] Context (2000) carriage returns in data (1997) validatin (1998) PHP Live (2005) WebCatalog NT beta 18 problem (1997) no country? (1998) Roundup function? (1997) [WriteFile] problems (1997) SSL do I need it?? (1998) shipcost (1997) Re1000001: Setting up shop (1997) SERIAL NUMBER BEING LOST AGAIN!!! (1999) 2.01 upgrade problems (1997) For those of you not on the WebCatalog Beta... (1997) [WebDNA] Triggers issue, or sendmail? (2012) Entry pages (was: WebCatalog MAJOR drawback) (1998) Multiple catalog databases and showcart (1997) WebCatalog2 Feature Feedback (1996) Multiple Items (1998)