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:

Migrating to NT (1997) BUG in [showif] using ^ (contains) (1997) [WebDNA] It's been a while so ... (2009) Createfolder / writefile problem (2004) [WebDNA] WebDNA 7 multiple fcgid processes (2012) Dynamic Pop up menu? (1997) WebCat2 several catalogs? (1997) Next (1997) limit to listwords (2001) Site Search Concepts (2003) Automated FTP from Shell - Update (2004) [OT] MacOs IE5 topmargin and leftmargin bug (2000) (1998) Email (1998) Items XX to XX shown (1997) Bug or syntax error on my part? (1997) Caching [include] files ... (1997) Sales Tax Rates 10/01/01 (2001) show all problem (1997) SSL and WebCatalog (1997)