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:

RE: [WebDNA] Show next..... (2010) Likelihood of a duplicate (2005) t or f (1997) Access and WebDNA (2002) multiple credit card merchant accounts/processors (1997) combining strings (1997) Free WebDNA snippets (Extending WebCatalog) (1997) Sorting by date (1997) Is everybody getting all the posts? (2002) Authenticate (1997) [WebDNA] WebDNA DE purchase (2008) Protecting Files (how to display vs. present a link to (2005) Cart Numbers (1997) Emailer port change (1997) OT bookmark my site (1999) emailer on Windows Beta 18 (1997) show me your store ! (2003) Crashing Server (2000) Newbie problem blah blah blah (1997) [append] vs. [appendfile] delta + question? (1997)