Re: URL problem
This WebDNA talk-list message is from 2007
It keeps the original formatting.
numero = 68415
interpreted = N
texte = Thanks, TomI need to rewrite any URL containing an underscore (_) and without an extension (tpl|gif|jpg|png|css|ico) so that it lands on index.tpl and passes the original requested URL to index.tpl.Will this work?RewriteEngine OnRewriteCond %{REQUEST_URI} !index\.tplRewriteCond %{REQUEST_URI} !\.(tpl|gif|jpg|png|css|ico)RewriteRule ^_ /index.tpl?requestedurl=%{REQUEST_URI} [L]On Feb 5, 2007, at 1:56 AM, Tom Duke wrote:> Pat,>> Yes the 'parser.tmpl' file is in the site root.>> Regarding the .htaccess file - I am not a mod_rewrite expert and it > took> me some time to get the syntax of my one correct. You'll really > have to> experiment. The basic structure is:->>> RewriteEngine On> << Turn the rewrite engine on >>>> RewriteRule ^admin/.*$ - [L]> << Exclude any URLs beginning with 'admin/' i.e. the admin directory -> the [L] means that this is the last rule that will be applied >>>> RewriteCond %{REQUEST_URI} !parser\.tmpl> << Do not rewrite the file 'parser.tmpl' >>>> RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico)> << Do not rewrite files with the specified suffixes >>>> RewriteRule ^(.+)$ /parser.tmpl?requestedurl=%{REQUEST_URI} [L]> << Rewrite everything else and send the url as a variable called> '[requestedurl]' >>>>> - Tom>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to digest@talk.smithmicro.com>> Web Archive of this list is at: http://webdna.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Thanks, TomI need to rewrite any URL containing an underscore (_) and without an extension (tpl|gif|jpg|png|css|ico) so that it lands on index.tpl and passes the original requested URL to index.tpl.Will this work?RewriteEngine OnRewriteCond %{REQUEST_URI} !index\.tplRewriteCond %{REQUEST_URI} !\.(tpl|gif|jpg|png|css|ico)RewriteRule ^_ /index.tpl?requestedurl=%{REQUEST_URI} [L]On Feb 5, 2007, at 1:56 AM, Tom Duke wrote:> Pat,>> Yes the 'parser.tmpl' file is in the site root.>> Regarding the .htaccess file - I am not a mod_rewrite expert and it > took> me some time to get the syntax of my one correct. You'll really > have to> experiment. The basic structure is:->>> RewriteEngine On> << Turn the rewrite engine on >>>> RewriteRule ^admin/.*$ - [L]> << Exclude any URLs beginning with 'admin/' i.e. the admin directory -> the [L] means that this is the last rule that will be applied >>>> RewriteCond %{REQUEST_URI} !parser\.tmpl> << Do not rewrite the file 'parser.tmpl' >>>> RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico)> << Do not rewrite files with the specified suffixes >>>> RewriteRule ^(.+)$ /parser.tmpl?requestedurl=%{REQUEST_URI} [L]> << Rewrite everything else and send the url as a variable called> '[requestedurl]' >>>>> - Tom>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to digest@talk.smithmicro.com>> Web Archive of this list is at: http://webdna.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Pat McCormick
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:
Sorting by date (1997)
old problem (2001)
Pithy questions on webcommerce & siteedit (1997)
[WebDNA] Anyone using version 6.2.1 in production on linux (2013)
More on the email templates (1997)
Security Issues and WebCommerce Solution (1997)
Add more fields to an existent data base (1997)
Re:mail list (1998)
[ShowIf] a either fields are blank (1998)
Logical and or in [hideif] (1997)
[WebDNA] Sendmail Problems (2008)
problems with 2 tags (1997)
WebCatalog on Mac AIX box (1998)
Mystery authentication (1997)
[OT] PHP?MySQL Help Needed (2003)
WebCatalog for Mac 2.0.1 Released (1997)
Nested tags count question (1997)
Dates (1996)
MacActivity and PCS (1997)
More questions about serial number dishing (1997)