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 = --000e0ce0b2b43fa33a04b7444df5Content-Type: text/plain; charset=UTF-8Govinda,I would suggest that you do not use [thisurl] to determine the address barURL. To achieve what you are looking for, i.e. for all requests to bepassed though one template I use the following .htaccess file:AddCharset UTF-8 .xmlOptions -IndexesRewriteEngine OnRewriteRule \.(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\.tmplRewriteCond %{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) ispassed to 'parser.tmpl' with the variables 'requestedurl' and 'query'.The 'parser.tmpl' template then parses the URL, queries the contentdatabases, and serves out the content.- Tom--000e0ce0b2b43fa33a04b7444df5Content-Type: text/html; charset=UTF-8Content-Transfer-Encoding: quoted-printableGovinda,
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 -IndexesRewriteEngine 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:
--000e0ce0b2b43fa33a04b7444df5Content-Type: text/plain; charset=UTF-8Govinda,I would suggest that you do not use
[thisurl] to determine the address barURL. To achieve what you are looking for, i.e. for all requests to bepassed though one template I use the following .htaccess file:AddCharset UTF-8 .xmlOptions -IndexesRewriteEngine OnRewriteRule \.(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\.tmplRewriteCond %{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) ispassed to 'parser.tmpl' with the variables 'requestedurl' and 'query'.The 'parser.tmpl' template then parses the URL, queries the contentdatabases, and serves out the content.- Tom--000e0ce0b2b43fa33a04b7444df5Content-Type: text/html; charset=UTF-8Content-Transfer-Encoding: quoted-printableGovinda,
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 -IndexesRewriteEngine 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.