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 = 108200
interpreted = N
texte = --000e0ce0b2b43fa33a04b7444df5 Content-Type: text/plain; charset=UTF-8 Govinda, I would suggest that you do not use [thisurl] to determine the address bar URL. To achieve what you are looking for, i.e. for all requests to be passed though one template I use the following .htaccess file: AddCharset UTF-8 .xml Options -Indexes RewriteEngine On RewriteRule \.(inc)$ - [F] RewriteRule ^robots\.txt$ - [L] RewriteRule ^admin/.*$ - [L] RewriteRule ^common/.*$ - [L] RewriteRule ^data/.*$ - [L] RewriteRule ^download/.*$ - [L] RewriteRule ^imglibrary/.*$ - [L] RewriteRule ^xml/.*$ - [L] RewriteCond %{REQUEST_URI} !parser\.tmpl RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico) RewriteRule ^(.+)$ /parser.tmpl?requestedurl=%{REQUEST_URI}&query=%{query_string} [L] So basically everything except the directories that I have excluded (admin. common. etc), and files with the specified extensions (gif, jpg, etc) is passed to 'parser.tmpl' with the variables 'requestedurl' and 'query'. The 'parser.tmpl' template then parses the URL, queries the content databases, and serves out the content. - Tom --000e0ce0b2b43fa33a04b7444df5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Govinda,

I would suggest that you do not use [thisurl] t= o determine the address bar URL. =C2=A0 To achieve what you are looking for= , i.e. for all requests to be passed though one template I use the followin= g .htaccess file:


AddCharset UTF-8 .xml
Options -Indexes
RewriteEngine On
RewriteRule \.(inc= )$ - [F]
RewriteRule ^robots\.txt$ - [L]
RewriteRule ^a= dmin/.*$ - [L]
RewriteRule ^common/.*$ - [L]
RewriteRule ^data/.*$ - [L]
RewriteRule ^download/.*$ - [L]
RewriteRule ^imglibrary/.= *$ - [L]
RewriteRule ^xml/.*$ - [L]
RewriteCond %{REQUE= ST_URI} !parser\.tmpl
RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico)
RewriteR= ule ^(.+)$ /parser.tmpl?requestedurl=3D%{REQUEST_URI}&query=3D%{query_s= tring} [L]


So basically every= thing except the directories that I have excluded (admin. common. etc), and= files with the specified extensions (gif, jpg, etc) is passed to 'pars= er.tmpl' with the variables 'requestedurl' and 'query'.=

The 'parser.tmpl' template then parses the URL,= queries the content databases, and serves out the content.

<= /div>
- Tom



--000e0ce0b2b43fa33a04b7444df5-- 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)
--000e0ce0b2b43fa33a04b7444df5 Content-Type: text/plain; charset=UTF-8 Govinda, I would suggest that you do not use [thisurl] to determine the address bar URL. To achieve what you are looking for, i.e. for all requests to be passed though one template I use the following .htaccess file: AddCharset UTF-8 .xml Options -Indexes RewriteEngine On RewriteRule \.(inc)$ - [F] RewriteRule ^robots\.txt$ - [L] RewriteRule ^admin/.*$ - [L] RewriteRule ^common/.*$ - [L] RewriteRule ^data/.*$ - [L] RewriteRule ^download/.*$ - [L] RewriteRule ^imglibrary/.*$ - [L] RewriteRule ^xml/.*$ - [L] RewriteCond %{REQUEST_URI} !parser\.tmpl RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico) RewriteRule ^(.+)$ /parser.tmpl?requestedurl=%{REQUEST_URI}&query=%{query_string} [L] So basically everything except the directories that I have excluded (admin. common. etc), and files with the specified extensions (gif, jpg, etc) is passed to 'parser.tmpl' with the variables 'requestedurl' and 'query'. The 'parser.tmpl' template then parses the URL, queries the content databases, and serves out the content. - Tom --000e0ce0b2b43fa33a04b7444df5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Govinda,

I would suggest that you do not use [thisurl] t= o determine the address bar URL. =C2=A0 To achieve what you are looking for= , i.e. for all requests to be passed though one template I use the followin= g .htaccess file:


AddCharset UTF-8 .xml
Options -Indexes
RewriteEngine On
RewriteRule \.(inc= )$ - [F]
RewriteRule ^robots\.txt$ - [L]
RewriteRule ^a= dmin/.*$ - [L]
RewriteRule ^common/.*$ - [L]
RewriteRule ^data/.*$ - [L]
RewriteRule ^download/.*$ - [L]
RewriteRule ^imglibrary/.= *$ - [L]
RewriteRule ^xml/.*$ - [L]
RewriteCond %{REQUE= ST_URI} !parser\.tmpl
RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico)
RewriteR= ule ^(.+)$ /parser.tmpl?requestedurl=3D%{REQUEST_URI}&query=3D%{query_s= tring} [L]


So basically every= thing except the directories that I have excluded (admin. common. etc), and= files with the specified extensions (gif, jpg, etc) is passed to 'pars= er.tmpl' with the variables 'requestedurl' and 'query'.=

The 'parser.tmpl' template then parses the URL,= queries the content databases, and serves out the content.

<= /div>
- Tom



--000e0ce0b2b43fa33a04b7444df5-- Tom Duke

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:

Pre-flight public flag (1997) Deleting Orders (1997) Repost paging through results detail view (2003) Format question WC Mac f3 (1997) [BULK] [WebDNA] How to test email validity? (2011) 4.51 Triggers (2003) OT: Jobseekers beware... (2003) Ot-Ip's on OSX (2004) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) Associative lookup style? + bit more (1997) Secure Server (1997) Include Files (1998) WebCat vs MS SiteServer? (1999) WebCat b13 CGI -shownext- (1997) Help with Repost Data msg from form (1997) Major bug report on rootbeer (1997) Error (1997) Dubble Sku's in a Database (1999) WebMerchant Processing criteria for AuthorizeNet (2000) pop up menu's (1998)