Re: WebDNA equivalent for $REQUEST_URI
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 56527
interpreted = N
texte = The general concept for most of the virtual-document WebDNA=20implementations I've done and seen is to modify the TemplateNotFound=20message in WebDNA's ErrorMessages.db to laod an include file that then=20=tries to identify and generate the desired document. In this case,=20[thisurl] gives the desired path.I've not tried the .htaccess file method. Would it work to call=20parser.tmpl as "parser.tmpl?path=3Dstuff/morestuff", then examine the=20"path" parameter inside parser.tmpl?- brianOn Mar 3, 2004, at 9:53 AM, devaulw@onebox.com wrote:> I'm not sure if [thisurl] functions the way you'd want after the=20> rewrite. But I have seen on the list that others have used rewrite=20> rules in the way you're intending. I think it was in the context of=20=> search engine friendly URLs.>> Perhaps a search in the archives might turn up some of these posts I'm=20=> remembering.>> Bill>> -----Original Message-----> From: Tom Duke
> Sent: Wed, 3 Mar 2004 17:33:53 -0000> To: (WebDNA Talk)> Subject: Re: WebDNA equivalent for $REQUEST_URI>>> Try [thisurl]>> Nitai,>> I probably should have explained that I am trying to use a .htaccess=20=> file with 'mod_rewrite' to call in a WebDNA template which then=20> includes files based on the string of text after the host.>> So the punter enters:->> http://yourdomain/stuff/morestuff>>> my .htaccess file contains:->> RewriteEngine On> RewriteRule \!.(gif=A6jpg=A6png=A6css)$ parser.tmpl>> =09> and then in 'parser.tmpl' I was hoping there would be a way a of=20=> determining the string 'stuff/morestuff'>>> Using a PHP script the predefined variable $REQUEST_URI provides this=20=> funtionality, I assumed it was getting it from a mime header or=20> something and was hoping that WebDNA might be able to extract it also.>> The [thisurl] context returns the path to the WebDNA template however=20=> rather than the URL that the browser requested, so I lose the string=20=> 'stuff/morestuff'.>> Maybe I can't do this with 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/
Associated Messages, from the most recent to the oldest:
The general concept for most of the virtual-document WebDNA=20implementations I've done and seen is to modify the TemplateNotFound=20message in WebDNA's ErrorMessages.db to laod an include file that then=20=tries to identify and generate the desired document. In this case,=20[thisurl] gives the desired path.I've not tried the .htaccess file method. Would it work to call=20parser.tmpl as "parser.tmpl?path=3Dstuff/morestuff", then examine the=20"path" parameter inside parser.tmpl?- brianOn Mar 3, 2004, at 9:53 AM, devaulw@onebox.com wrote:> I'm not sure if [thisurl] functions the way you'd want after the=20> rewrite. But I have seen on the list that others have used rewrite=20> rules in the way you're intending. I think it was in the context of=20=> search engine friendly URLs.>> Perhaps a search in the archives might turn up some of these posts I'm=20=> remembering.>> Bill>> -----Original Message-----> From: Tom Duke > Sent: Wed, 3 Mar 2004 17:33:53 -0000> To: (WebDNA Talk)> Subject: Re: WebDNA equivalent for $REQUEST_URI>>> Try [thisurl]>> Nitai,>> I probably should have explained that I am trying to use a .htaccess=20=> file with 'mod_rewrite' to call in a WebDNA template which then=20> includes files based on the string of text after the host.>> So the punter enters:->> http://yourdomain/stuff/morestuff>>> my .htaccess file contains:->> RewriteEngine On> RewriteRule \!.(gif=A6jpg=A6png=A6css)$ parser.tmpl>> =09> and then in 'parser.tmpl' I was hoping there would be a way a of=20=> determining the string 'stuff/morestuff'>>> Using a PHP script the predefined variable $REQUEST_URI provides this=20=> funtionality, I assumed it was getting it from a mime header or=20> something and was hoping that WebDNA might be able to extract it also.>> The [thisurl] context returns the path to the WebDNA template however=20=> rather than the URL that the browser requested, so I lose the string=20=> 'stuff/morestuff'.>> Maybe I can't do this with 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/
Brian Fries
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:
The Guru Speaks-very long reply (1998)
lookup (1998)
WebCat2b13MacPlugin - nested [xxx] contexts (1997)
Custom formulas.db (1998)
Round up prices (2000)
Capacity question (2002)
[WebDNA] TEST (2013)
is sku a REQUIRED field on NT (1997)
Problem (1997)
FCKeditor (2008)
[OT] Trying to steal databases on our server (2003)
WebCommerce: Folder organization ? (1997)
OT: Making demo movies (2002)
SMSI: databases corrupted on crash and permission issueson OSX (2002)
how to check for no value while using [URL] to prevent cr (1999)
OT: Poll Please (2002)
wierd [cart] action! (1997)
Progress !! WAS: Trouble with formula.db (1997)
New WebCatalog Version !!! (1997)
WebCat editing, SiteGuard WAS:SiteAssociative lookup style? (1997)