Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite'

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 108144
interpreted = N
texte = >> When I put webdna's [thisurl] tag into a .dna template that webdna = parses.. then (desired behavior) the output of [thisurl] reflects the = URL that I actually typed in the browser.. and NOT where the RewriteRule = redirected the browser to. But on a friend's remote server, where we = are working together, the inverse is happening - i.e. the output of = [thisurl] reflects where the RewriteRule redirected the browser to, as = opposed to the URL that I actually typed in the browser (NOT desired = behavior) . =20 >=20 > what is the WebDNA version of your friend's server? > Try this: platform=3Dunix-Macintosh OS X version=3D6.0 > [function name=3DCALL_DOMAIN][return][listmimeheaders = name=3Dhost&exact=3DF][url][value][/url][/listmimeheaders][/return][/funct= ion] > [CALL_DOMAIN] Thanks Chris :-) ...but [listmimeheaders = name=3Dhost&exact=3DF][url][value][/url][/listmimeheaders] only returns = the *domain*, and not also any of the directories that come *after* the = domain in the URL... whereas [thisurl] does also return any of the = directories that come *after* the domain in the URL. I need the = directories too. >=20 >> Does anyone know a way to cause the output of [thisurl] to always = reflect the URL that I actually type in the browser.. and NOT where the = RewriteRule redirects the browser to? >=20 > i suppose it depends if the apache module mod_rewrite processes the = URL before or after WebDNA does If this is true, then: Do you know how to control when mod_rewrite kicks in? We could use some = help with this level of apache admin. Apparently, we want mod_rewrite = to kick in *after* webdna gets the file.. but at the moment the reverse = is happening. Or, wait a minute.. this makes no sense. If apache tried to hand the = file to webdna before mod_rewrite kicked in then I would not see = anything resembling my page in the browser because the URL is pointing = to a *non-existent* file. The fact that the file is non-exitant is the = very reason I want to use mod_rewrite. My RewriteRule causes the URL = to become re_written to point to a real existent webdna file. AFAICT mod_rewrite *has to be* (in both my local and remote cases) = kicking in before webdna gets the file.. because my file IS being parsed = by webdna and spitting out the expected dynamic HTML output... the only = problem is that in the remote-server case [thisurl] reflects the = *post-RewriteRule* URL, as opposed to the *pre-RewriteRule* URL. Maybe = that is expected behavior... but then why on my local setup does = [thisurl] reflect the *pre-RewriteRule* URL?! Would anyone be willing to setup up a test case and see what you find.. = set up mod_rewrite and a RewriteRule in .htaccess which points a sample = URL like this non-existent page: 'domain.com/testDIR_A/testPAGE_A.html' = ... to your existent page: 'domain.com/testDIR_B/testPAGE_B.html' = page... and then inspect the output of [thisurl] to see what you get. = And while reporting findings, please mention if your test was on your = localhost setup, or was it on a remote server? I would like to know the = results of both if possible. The results of all this is something I am trying to finish off in the = next couple days and share with the group here.. something nice and = really worthwhile. Thanks! -Govinda= Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Tom Duke 2012)
  2. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  3. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Tom Duke 2012)
  4. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  5. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  6. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Tom Duke 2012)
  7. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  8. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  9. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  10. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  11. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  12. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  13. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Tom Duke 2012)
  14. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  15. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  16. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  17. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Donovan Brooke 2012)
  18. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  19. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Donovan Brooke 2012)
  20. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  21. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  22. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Donovan Brooke 2012)
  23. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  24. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  25. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  26. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  27. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (christophe.billiottet@webdna.us 2012)
  28. [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
>> When I put webdna's [thisurl] tag into a .dna template that webdna = parses.. then (desired behavior) the output of [thisurl] reflects the = URL that I actually typed in the browser.. and NOT where the RewriteRule = redirected the browser to. But on a friend's remote server, where we = are working together, the inverse is happening - i.e. the output of = [thisurl] reflects where the RewriteRule redirected the browser to, as = opposed to the URL that I actually typed in the browser (NOT desired = behavior) . =20 >=20 > what is the WebDNA version of your friend's server? > Try this: platform=3Dunix-Macintosh OS X version=3D6.0 > [function name=3DCALL_DOMAIN][return][listmimeheaders = name=3Dhost&exact=3DF][url][value][/url][/listmimeheaders][/return][/funct= ion] > [CALL_DOMAIN] Thanks Chris :-) ...but [listmimeheaders = name=3Dhost&exact=3DF][url][value][/url][/listmimeheaders] only returns = the *domain*, and not also any of the directories that come *after* the = domain in the URL... whereas [thisurl] does also return any of the = directories that come *after* the domain in the URL. I need the = directories too. >=20 >> Does anyone know a way to cause the output of [thisurl] to always = reflect the URL that I actually type in the browser.. and NOT where the = RewriteRule redirects the browser to? >=20 > i suppose it depends if the apache module mod_rewrite processes the = URL before or after WebDNA does If this is true, then: Do you know how to control when mod_rewrite kicks in? We could use some = help with this level of apache admin. Apparently, we want mod_rewrite = to kick in *after* webdna gets the file.. but at the moment the reverse = is happening. Or, wait a minute.. this makes no sense. If apache tried to hand the = file to webdna before mod_rewrite kicked in then I would not see = anything resembling my page in the browser because the URL is pointing = to a *non-existent* file. The fact that the file is non-exitant is the = very reason I want to use mod_rewrite. My RewriteRule causes the URL = to become re_written to point to a real existent webdna file. AFAICT mod_rewrite *has to be* (in both my local and remote cases) = kicking in before webdna gets the file.. because my file IS being parsed = by webdna and spitting out the expected dynamic HTML output... the only = problem is that in the remote-server case [thisurl] reflects the = *post-RewriteRule* URL, as opposed to the *pre-RewriteRule* URL. Maybe = that is expected behavior... but then why on my local setup does = [thisurl] reflect the *pre-RewriteRule* URL?! Would anyone be willing to setup up a test case and see what you find.. = set up mod_rewrite and a RewriteRule in .htaccess which points a sample = URL like this non-existent page: 'domain.com/testDIR_A/testPAGE_A.html' = ... to your existent page: 'domain.com/testDIR_B/testPAGE_B.html' = page... and then inspect the output of [thisurl] to see what you get. = And while reporting findings, please mention if your test was on your = localhost setup, or was it on a remote server? I would like to know the = results of both if possible. The results of all this is something I am trying to finish off in the = next couple days and share with the group here.. something nice and = really worthwhile. Thanks! -Govinda= Govinda

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:

Nested tags count question (1997) Advanced WebCat Guidelines - do they exist beyond docs (1999) Large sites (2003) Major bug report on rootbeer (1997) Adding headers to email (1997) and vs or vs not (1998) [OT] Brain Switching (2004) wc 2 pro users - sites, quotes wanted (1997) PROTECT PAGES (2002) Associative lookup style? (1997) [NT] ie 4.0 required (1997) Purchased cart being overwritten - still !?? (1997) Frames and WebCat (1997) WebMerchant? (1998) Imagemagick and fonts (2004) I'm tired of all this! (2000) E-Mailer (WebCatb15acgiMac) (1997) Cart questions (1997) vs (1997) Help! WebCat install problems... (2000)